Using 'disp' function with variables
39 ビュー (過去 30 日間)
古いコメントを表示
I have a line of code which is giving me some trouble and I cant understand why:
disp('There is an ice rule violation at: (', xd, ',', yd, ')')
where xd and yd are variables that are generated beforehand and I simply want it to display:
There is an ice rule violation at: (7,8)
where 7 and 8 are examples of xd and yd respectively and the program gives me an error:
Error using disp
Too many input arguments.
Error in New_correlation_values_3_2/checkvertex (line 145)
disp('There is an ice rule violation at: (', xd, ',', yd, ')')
Error in New_correlation_values_3_2 (line 45)
[N,avg] = checkvertex(xd,yd,M,N,ic,jc);
0 件のコメント
採用された回答
ES
2013 年 8 月 29 日
disp() takes only one argument.
To accomplish what you need, do disp(['There is an ice rule violation at: (', num2str(xd), ',', num2str(yd), ')'])
Thanks!
0 件のコメント
その他の回答 (1 件)
chaibrassou mohamed salah
2021 年 2 月 7 日
X= input (' veuillez introduire votre numéro d inscription = ','s');
Y= input (' veuillez introduire votre Nom = ','s');
Z= input (' veuillez introduire votre Prénom = ','s');
A= input (' veillez introduire votre Date de naissance sous forme de nombre entier Année = ','s');
B= input (' mois = ','s');
C =input ('jour= ','s');
E=input (' Quel est votre Groupe =','s');
F = input('Quelle est votre Année universitaire sous forme debut de l annne/fin de l Année/n debut de l Année =','s');
G=input ('fin de l Année=','s');
disp('numéro d inscription:',X,'\n','Nom:',Y,'\n',' Prénom :',Z,'\n','Date de naissance ',A,'/',B,'/',C,'\n','Groupe : ',E,'\n',' Année universitaire : ',F,'/',G)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Signal Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!