fprintf in if statement

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

 Risposta accettata

madhan ravi
madhan ravi il 21 Ago 2019
Modificato: madhan ravi il 21 Ago 2019
if x == 1 % where x is assumed as a scalar
fprintf('hello')
end
help if
doc if

Più risposte (0)

Categorie

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by