max function does not work
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello
I am trying to use the max function, but it will not work. I have attached my log file.
I have tried using this function
maxStcev=max(Stcev'-K,0); (line 52), but I keep getting negative values.
I have then tried using a for loop with if statement, but this results in error:
"Index exceeds matrix dimensions.
Error in mccev (line 45)
if (M1(1,o)<0)"
Can someone see what I am doing wrong? I want t have a vector only with positive values.
Regards,
Søren
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!