hello, i have 5 input as following , how to use print command as print(' a= ' a , ' b= ' b, ' c= ' c, ' d= ' d,' e= ' e) in order to display output a=3 b =4 c=6 d=7 e=9

조회 수: 2 (최근 30일)
a=3; b=4; c=6; d=7; e=9;

채택된 답변

Image Analyst
Image Analyst 2016년 9월 1일
Try this:
a=3;
b=4;
c=6;
d=7;
e=9;
% Display output a=3 b =4 c=6 d=7 e=9
fprintf('a=%d b =%d c=%d d=%d e=%d\n', a,b,c,d,e);
Results in the command window match your desired result.
a=3 b =4 c=6 d=7 e=9
  댓글 수: 2
mohammed hamdy
mohammed hamdy 2016년 9월 1일
편집: mohammed hamdy 2016년 9월 1일
thank u very much . true answer..but i used fprintf('segma=%d z0 =%d phi=%d\n', s(tt),z0(tt),phi(tt)); display segma=2 z0 =3.000000e-01 phi=4.000000e-01 in terms of e . what i do to display output without e
mohammed hamdy
mohammed hamdy 2016년 9월 1일
thank u very much . true answer..but i used fprintf('segma=%d z0 =%d phi=%d\n', s(tt),z0(tt),phi(tt)); display segma=2 z0 =3.000000e-01 phi=4.000000e-01 in terms of e . what i do to display output without e

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2016년 9월 1일
편집: Azzi Abdelmalek 2016년 9월 1일
str={'a','b','c','d'}
v={3 4 5 6}
w=[str; v]
sprintf('%s=%d;',w{:})

카테고리

Help CenterFile Exchange에서 Oceanography and Hydrology에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by