how to say a number in the title
13 次查看(过去 30 天)
显示 更早的评论
'Probability greater than swtNPVProb(i,1)'
i is the loop variable. how do i get it to say the number associated with the variable in each loop, and report that number to the screen?
0 个评论
回答(3 个)
Sagar Damle
2014-5-13
Try this -
swtCI = [.99 .95 .50 ]';
for i = 1:length(swtCI)
disp(['Upper Bound for ',num2str(swtCI(i,1))]);
end
This is because,disp() requires its all arguments of same datatype.
0 个评论
nl2605
2014-5-13
title(['Probability greater than swtNPVProb(',num2str(i),',1)']); However, in the same plot the last value would appear.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!