how to multiply integers
显示 更早的评论
This is the question I got asked.
when I enter for i=1:10
k=i*222
end
1 个评论
Stephen23
2018-11-6
By the way, the best method is without a loop:
V = 10 * (1:15);
fprintf('%.2f\n',V)
回答(1 个)
madhan ravi
2018-11-6
编辑:madhan ravi
2018-11-6
for i=1:10
k=i*222;
fprintf('value is %.2f\n',k) %or
sprintf('value is %.2f',k)
end
1 个评论
madhan ravi
2018-11-6
@Taylor don't change your question after someone gives answer it makes the answer look stupid!
类别
在 帮助中心 和 File Exchange 中查找有关 Lengths and Angles 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!