try something like this (it is very straight forward),
x=0:.1:10;
plot(x,yourfunctionname(x));
function [ y ] = yfunc( x )
%YFUNC Summary of this function goes here
% Detailed explanation goes here
for i=1:size(x,1)
if x(i,1) > 0 & x(i,1) <= 2
y(i,1)=2*x(i,1);
elseif x(i,1)>2 & x(i,1)<4...
I am looking for a package to use in Latex by which I can include a m-file in my latex document while keeping the same layout is in my m-file.
I hope someone can help me with it.
Regards,
Hans
In Matlab I have defined follow matrix
R=[0, -k2-b2, k2+b2+m2, -1; -k1-b1, k1+k2+b1+b2+m1, -k2-b2, 1]
How can I ascribe values to the variables k1 k2 b1 b2 m1 and m2 and update the matrix R?
greatings,
Hans