fprintf in if statement
10 views (last 30 days)
Show older comments
Hi,
Is there a way to only fprintf data while using an if statement. For example, if x = 1, fprintf ('hello');
Thanks
0 Comments
Accepted Answer
madhan ravi
on 21 Aug 2019
Edited: madhan ravi
on 21 Aug 2019
if x == 1 % where x is assumed as a scalar
fprintf('hello')
end
help if
doc if
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!