Plotting, keep getting error that matrix dimensions must agree

3 ビュー (過去 30 日間)
Stephen Dahl
Stephen Dahl 2017 年 1 月 14 日
コメント済み: the cyclist 2022 年 1 月 30 日
I keep getting the same error. I have changed the functions and limits and it worked but it will not work with the functions I need to plot. Not sure what to do, so any help is appreciated.
Thanks.
<<
>>
  1 件のコメント
the cyclist
the cyclist 2017 年 1 月 14 日
編集済み: the cyclist 2017 年 1 月 14 日
In the future, please upload the code itself, rather than an image of the code. Then we can paste your code directly into MATLAB, which makes it much easier for us to help you.

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

採用された回答

the cyclist
the cyclist 2017 年 1 月 14 日
編集済み: the cyclist 2017 年 1 月 14 日
You need to use array operations (i.e. element-by-element operations) for what you want to do, rather than matrix operations. For example, you need
y = -1.436./x
in place of
y = -1.436/x
  3 件のコメント
Muhammad Azrul Izmee
Muhammad Azrul Izmee 2022 年 1 月 27 日
Hv tried .* But it keep mention matrix dim must agree!!!
the cyclist
the cyclist 2022 年 1 月 30 日
@Muhammad Azrul Izmee, I suggest you open a new question, with the full description of your problem, instead of commenting on a 5-year-old question and not providing any details.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by