Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Writing a function (.m executable) - how do I perform tasks on my workspace variables?

1 回表示 (過去 30 日間)
Pocho
Pocho 2011 年 12 月 3 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have arrays called "Blah1", "Blah2", etc., in the workspace, and I want to write a function that finds the max of "Blah1", etc., and writes these max values to a text file.
I am not sure how to indicate in the .m file that I am performing the function on 'Blah." I'm good with the writing to a text file part.
Ideas?
Thanks,
Pocho

回答 (2 件)

Naz
Naz 2011 年 12 月 3 日
pass your blah matrix as an argument to your function:
yourfunction(blah1,blah2);

Walter Roberson
Walter Roberson 2011 年 12 月 3 日

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by