Seems you are doing fine.. Here are some tips:
You can use ctrl-I in the editor to auto indent your code.
IMO, fprintf is nicer than disp(sprintf.. syntax is the same, just add \n for newline.
I would also skip the input(-statements.. saves the hassle of typing in all the constants at run time.
-gal
|