cubic = zeros(2,1); % a column vector x = 2t^2 +1; y = t^3; cubic(1) = x; cubic(2) = y; I have two questions: (1) I have an array T=[0:0.01:1] , I want to obtain a matrix of X=cubic(T) and I always have error about this syntax. How could I obtain X? (2) In fact, I initially want to plot x against y, in the range t=0..1 , how could I do that? Thanks in advance.
更新1:
Hello, (1) I believe that there is a trick other than using loop, otherwise MATLAB is useless!! e.g. Y=sin(T); Y is then an array without any looping statement.
更新2:
(2) If the code is wrong, how could I use [plot] ? Could someone kindly show me the [correct and exact codes] to me? Thanks a lot.