I need to receive one row vector do some math on it and return two row vectors, I'm getting an error regarding parentheses. What's wrong?
1 回表示 (過去 30 日間)
古いコメントを表示
採用された回答
その他の回答 (1 件)
Steven Lord
2016 年 11 月 9 日
Indexing into matrices in MATLAB uses parentheses, not square brackets.
Defining a function that has multiple outputs requires the output arguments in the definition to be enclosed in square brackets, not parentheses.
The colon operator may not behave the way you think for a nonscalar input, like the output of the size function with one input. You probably want to use numel instead of size.
I'm guessing that you're new to MATLAB. If that is the case I highly recommend going through the Getting Started section of the documentation and/or MATLAB Academy. Find the equivalent of this page in your installed documentation and read through the tutorials and/or complete the interactive MATLAB Academy tutorial.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!