how to display two value in each row of one message box?

3 ビュー (過去 30 日間)
son
son 2014 年 8 月 23 日
コメント済み: Star Strider 2014 年 8 月 23 日
hi, please hlep
x = [0 3 4 5 7 9 10 2 3 5];
y = 4:1:14;
z = 5 * x
find all the z that 10 < z < 0.7*max(z) and display the value of z and corresponding y in one message box for example:
the value of z = 20 at y = 6
the value of z = 25 at y = 7
the value of z = 35 at y = 8
the value of z = 15 at y = 13
the value of z = 25 at y = 14
  1 件のコメント
son
son 2014 年 8 月 23 日
actually, y=4:1:13;

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

採用された回答

Star Strider
Star Strider 2014 年 8 月 23 日
編集済み: Star Strider 2014 年 8 月 23 日
This works:
x = [0 3 4 5 7 9 10 2 3 5];
y = 4:1:13;
z = 5 * x;
ix = find((z < 0.7*max(z)) & (z > 10));
msgbox(sprintf('The value of z = %d at y = %d\n', [z(ix)' y(ix)']'))
Sorry, missed that on the the first read. Changed y as well.
  3 件のコメント
son
son 2014 年 8 月 23 日
i found it. many thanks
Star Strider
Star Strider 2014 年 8 月 23 日
My pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePerformance and Memory についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by