Info
この質問は閉じられています。 編集または回答するには再度開いてください。
how to put iterations from a foor loop in a vector
1 回表示 (過去 30 日間)
古いコメントを表示
What i want to achieve is my own DFT alogrithm. I want to start off by sampling the signal, x(t)=x(n(delta)T). I want to be able to run this in a for loop then take every sample value and place it in a vector Xk=[ ] which will have those sample values. Thanks.
1 件のコメント
回答 (1 件)
Sean de Wolski
2013 年 3 月 5 日
v = zeros(10,1);
for ii = 1:10
v(ii) = rand;
end
1 件のコメント
Jan
2013 年 3 月 5 日
I would work without the pre-allocation in the 1st line, but this is essential for the performance.
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!