フィルターのクリア

Error Using *. Matrix Dimensions Must Agree

2 ビュー (過去 30 日間)
Ratanjot
Ratanjot 2023 年 2 月 7 日
コメント済み: Jan 2023 年 2 月 7 日
I am creating an app in app designer and having an issue where once the user selects the appropriate response such as Current Summary from the drop down menu, and clicks on the 'Output Plot' button, it will plot in the UIAxes as shown in the image. When selecting the Current Summary and running it, I get an error at the Current Limit axis. This is supposed to be just a horizontal line at a fixed y value for all values of time. I get an error saying 'Matrix Dimensions Must Agree'. When I don't use element multiplication and just use '*' for the y values, it tells me to use '.*' but that doesnt work since the matrix dimensions don't agree. Is there a solution to this I can use in app designer. I've also tried yline but that has given me errors. Thank you.
  1 件のコメント
Jan
Jan 2023 年 2 月 7 日
"I've also tried yline but that has given me errors." - Please post the code and the complete error message. Mentioning a problem vaguely only does not help.

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

採用された回答

Jan
Jan 2023 年 2 月 7 日
The error message is clear: The dimension of the operators do not match. We cannot run your code (posted as screenshot unfortunately), so it is your turn to check the dimensions. Set a breakpoint in this line and run the code again. Then check the dimensions of the arguments. You will see, that they do not match. Without knowing, what the dimensions are and how the variables have been created, it is impossible to guess, how this can be fixed.
  2 件のコメント
Ratanjot
Ratanjot 2023 年 2 月 7 日
Is there an easier way to plot a horizontal line for all values of time in app.time compared to the method I had in the code.?
Jan
Jan 2023 年 2 月 7 日
@Ratanjot: Yes: yline(). You have mentioned, that you have tried this and that there was some error. Please elaborate this. But the expanding should work also, as sonn as you have removed the bug.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by