Store output in array
1 回表示 (過去 30 日間)
古いコメントを表示
Hi everyone,
For the randomly generated points, I would like to store the output of 'position' as an array such that I can make reference to it in future.
I know this can be done when using a for loop, but is it possible to accomplish without the need of manually entering each result as a vector?
Any help would be kindly appreciated.
r=3;
m=10;
x=rand(1,m)*r;
alpha=pi*2*rand(1,m);
position=x.*exp(i*alpha)
Cheers.
0 件のコメント
採用された回答
Star Strider
2015 年 4 月 21 日
Your ‘position’ vector is a vector in your code.
What do you want to do with it?
4 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!