Matlab
Matlab does not have a nice function like Table so one
can either make the \(x\) variable and then use it to make \(\sin (x)\)
or use arrayfun
close all;
x=-pi:.1:pi;
plot(x,sin(x));
Using arrayfun
A=cell2mat(arrayfun(@(x) [x;sin(x)],...
-pi:.1:pi, 'UniformOutput',false));
plot(A(1,:),A(2,:))
|
|