Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Array indices must be positive integers or logical values. How to solve?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Risposte (2)
Walter Roberson
il 18 Mag 2019
A3 (sigma3 / Ua)
is a request to either call a function named A3 passing in sigma3/Ua as a parameter, or else to index a variable named A3 at location sigma3/Ua .
If you compare to the rest of your code, what you probably want is
a3 * (sigma3 / Ua)
0 Commenti
Sulaymon Eshkabilov
il 18 Mag 2019
a1 = 0.22; a2 = a1; a3 = a2;
gamma1 = .194; gamma2 = gamma1; gamma3 = gamma1;
sigma1 =.1; sigma2=sigma1; sigma3 = sigma1;
MD = 1;
Ua = input('Enter Ua: ');
n = (1-MD / (a1 * (sigma1 / Ua) ^ (- gamma1)) + a2 * (sigma2 / Ua) ^ (- gamma2) + a3*(sigma3 / Ua) ^ (- gamma3)) ^ 3;
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!