how to say a number in the title
Mostra commenti meno recenti
'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?
Risposte (3)
Walter Roberson
il 13 Mag 2014
title(sprintf('Probability greater than swtNPVProb(%d,1)', i))
1 Commento
Sameer
il 13 Mag 2014
Sagar Damle
il 13 Mag 2014
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
il 13 Mag 2014
0 voti
title(['Probability greater than swtNPVProb(',num2str(i),',1)']); However, in the same plot the last value would appear.
Categorie
Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!