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

 採用された回答

madhan ravi
madhan ravi 2019 年 8 月 21 日
編集済み: madhan ravi 2019 年 8 月 21 日

0 投票

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEntering Commands についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by