Wednesday 23 January 2013

Function in matlab



this m.file name and function name is always same minded
function[]=show(a);
x=a;
for i=1:1:10
    z=x*i;
    fprintf('%d*%d=%d\n',x,i,z);
end
end


another function 2nd m file

n=input('Enter any number\n');
show(n);

0 comments:

Post a Comment