How can i give inputs as a matrix ?

3 ビュー (過去 30 日間)
bora
bora 2018 年 12 月 22 日
コメント済み: Stephen23 2018 年 12 月 22 日
i have a function a(x1,x2,x3 ........ x161) = ..........;
when i give inputs in this function like this a(randn(1,161))
it returns me only one input is given. need 160 more input how can i solve this issue
  1 件のコメント
Stephen23
Stephen23 2018 年 12 月 22 日
"i have a function a(x1,x2,x3 ........ x161)..."
You should really consider redesigning your function so that it just has one array inut, rather than 161 individual input arguments. One array input would be much simpler to work with, be less liable to bugs, and most likely make your code more efficient.

サインインしてコメントする。

採用された回答

madhan ravi
madhan ravi 2018 年 12 月 22 日
編集済み: madhan ravi 2018 年 12 月 22 日
inputs=num2cell(randn(1,160))
a(inputs{:})
  2 件のコメント
bora
bora 2018 年 12 月 22 日
Man, hallelujah goes out to you <3

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by