fprintf in if statement

14 visualizaciones (últimos 30 días)
Ryan Allan
Ryan Allan el 21 de Ag. de 2019
Comentada: madhan ravi el 21 de Ag. de 2019
Hi,
Is there a way to only fprintf data while using an if statement. For example, if x = 1, fprintf ('hello');
Thanks

Respuesta aceptada

madhan ravi
madhan ravi el 21 de Ag. de 2019
Editada: madhan ravi el 21 de Ag. de 2019
if x == 1 % where x is assumed as a scalar
fprintf('hello')
end
help if
doc if

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by