# Math Help - help with matlab programs

1. ## help with matlab programs

Hi,

I am completely new with matlab. I need help with my class assignment. It is attached in pdf format. The matlab assignment is on page 3. I would really be thankful if somebody can help me.

2. To help you out with the matlab side of things, have a look at the following code and see if you can adapt it to you problem.

save this as myfoo.m
Code:
function output = myfoo(t,f)
output = sin(t/f);
save this as another file and run it or past straight into the command window (assuming you have already changed you working directory to be the one that hold myfoo.m

Code:
cla
t = linspace(0,2*pi,100);
hold on
for f = linspace(0.1,1,3)
plot(t,myfoo(t,f))
end
hold off
Regards Elbarto