Storing the output of a program in a matrix
2 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I've made a program, doesn't matter what it does, and say it's called "progA". I get the program progA to output a number into the console everytime I run it. Now I want to make another program that runs progA and stores the output in a new array.
How would I go about this?
many thanks,
Phill
0 件のコメント
回答 (2 件)
KALYAN ACHARJYA
2019 年 12 月 1 日
編集済み: KALYAN ACHARJYA
2019 年 12 月 1 日
No need to run another program to save the output of progA in array. Just do the indexing in progA, its automatically generates the array of data.
It would be more clear, if you can share the represenative/skeleton code of progA
2 件のコメント
BobH
2020 年 3 月 5 日
Do you mean like this?
progA = @() 42; % return 42 for each invocation
y = progA()
y =
42
z = arrayfun(@(X) progA(), 1:473);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!