How can i achieve this "linspace" problem?
Show older comments
I should create 3 matrix (named as "d") with using linspace, but i can not use linspace command in for loop as at the code box. What is the reason of this problem?
Thanks,
kk=[8 10 12]
for j=1:numel(kk)
d(j)=linspace(0,50,kk(j))
end
alternatively;
for r=1:1:numel(kk)
for u=1:1:numel(kk)
dd(r,:)=linspace(0,50,kk(u))
end
end
I want to create 3 dd matrixes with using linspace by 8,10 and 12 values.
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!