MATLAB HELP

edited April 2009 in Science & Tech
hey im new to matlab and i have to make a mfile in matlab that uses only two (scalar) variables, x and y. any help would be much appreciated

function taylor2
fprintf(‘values of x approximation y\n’)
x= 1 ;
y = 2 ;
h = 0.01 ;
fprintf ( ‘%8.2f ’,x), fprintf (‘%19.8f \n’,y)
for i = ____________________
y = ______________________________ ;
x = __________________________ ;
fprintf ( ‘%8.2f ’,x), fprintf (‘%19.8f \n’,y)
end

Comments

  • SnarkasmSnarkasm Madison, WI Icrontian
    edited April 2009
    Well, you've done that. That's an mfile using only x and y right there.

    Now what are you trying to do with them?
  • edited April 2009
    i want it to compute an approximate solution to an initial-value problem on the interval [1, 1.2] using step size h=0.1... i need to fill in the blanks in the file
Sign In or Register to comment.