how to say a number in the title
이전 댓글 표시
'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?
답변 (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.
nl2605
2014년 5월 13일
0 개 추천
title(['Probability greater than swtNPVProb(',num2str(i),',1)']); However, in the same plot the last value would appear.
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!