Why the plot code wont work ? check codes below! HELP ME PLEASE

g=9.81;
Q = app.Qm3sEditField.Value;
b = app.bmEditField.Value;
q = Q/b;
for j=1:length(q)
yc=(q(j)^2/g)^(1/3);
Depth = [0.5*yc 0.6*yc 0.7*yc 0.8*yc 0.9*yc yc 1.1*yc 1.2*yc 1.5*yc 1.9*yc];
Eprime = [];
for i=1:length(Depth)
E(i,j) = y(i)+q(j)^2/(2*g*y(i)^2);
Eprime = [Eprime E(i,j)];
end
end
plot(app.UIAxes,Eprime,Depth,'or','MarkerFaceColor','r');
hold (app.UIAxes,'on')

6 件のコメント

Walter Roberson
Walter Roberson 2022 年 8 月 6 日
Q = app.Qm3sEditField.Value;
b = app.bmEditField.Value;
Do we know for sure that those are not empty? Check their sizes
poorya gholamnejad
poorya gholamnejad 2022 年 8 月 6 日
the size is from -inf to inf !
Walter Roberson
Walter Roberson 2022 年 8 月 6 日
Show us the output of
size(Q)
size(b)
poorya gholamnejad
poorya gholamnejad 2022 年 8 月 6 日
I wrote this in script and it worked but i need in appdesigner , why would they be empty ?
poorya gholamnejad
poorya gholamnejad 2022 年 8 月 6 日
Walter Roberson
Walter Roberson 2022 年 8 月 6 日
Using your app designer version put a breakpoint in at
q = Q/b;
and show us size(Q) and size(b) there. You will be at the K>> debugging prompt when you do that.

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品

リリース

R2017a

質問済み:

2022 年 8 月 6 日

コメント済み:

2022 年 8 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by