フィルターのクリア

I want to display name of variable in msgbox instead of its value. for example;

1 回表示 (過去 30 日間)
msahar
msahar 2014 年 11 月 3 日
回答済み: Stalin Samuel 2014 年 11 月 3 日
I want to display name of variable in msgbox instead of its value. for example;
d1=3 ; d2=5 ; d3=2 y = [d1 d2 d3]; x=min(y); % 2
% The minimum value coressponds to d3
msgbox('????????')
msgbox should display " The minimum value is of d3 "

回答 (2 件)

MA
MA 2014 年 11 月 3 日
d1=3;d2=5;d3=2;
y=[d1 d2 d3];
x=min(y)
good luck
  2 件のコメント
msahar
msahar 2014 年 11 月 3 日
x contain the minium value, this minimum value corresponds to d3, how to display d3 instead of value of x which is 2. This is called reflection in other languages.
MA
MA 2014 年 11 月 3 日
try this:
clear all
clc;
d1=3;d2=5;d3=2;
y=[d1 d2 d3];
x=min(y);
message = sprintf('min = %4d\n', x);
uiwait(msgbox(message));
fprintf(message);
good luck

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


Stalin Samuel
Stalin Samuel 2014 年 11 月 3 日
msgbox('The minimum value is of d3 ')

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by