Hi,
Is there a way to only fprintf data while using an if statement. For example, if x = 1, fprintf ('hello');
Thanks

 Akzeptierte Antwort

madhan ravi
madhan ravi am 21 Aug. 2019
Bearbeitet: madhan ravi am 21 Aug. 2019

0 Stimmen

if x == 1 % where x is assumed as a scalar
fprintf('hello')
end
help if
doc if

Weitere Antworten (0)

Kategorien

Mehr zu Entering Commands finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by