p = [15 30 45 60 75 90 75 60 45 30 15 30 45 60 75 90 75 60 45 30];N1 = 10;randidx = randi(numel(p), [1 20 N1]);p = p(randidx);for k= 1:20 for i = 1:10 a(k)= cosd (p(:,k,i)); b(k)= sind (p(:,k,i)); end L(:,:,k) = [a(k)*b(k) 0 (a(k))^2; 0 0 b(k); 0 0 0;]; end
I want every i = 1:10 value but i unable to get. How can i store values for p(:,:,1) for 20 L(:,:,k) and p(:,:,2) for 20 L(:,:,k)…..and so on…please help me.
Best Answer