How can I generate a code for this equation?
Mostra commenti meno recenti
compute this formula
Risposta accettata
Più risposte (1)
Raj
il 10 Giu 2019
If you have Symbolic math toolbox then this can be done in an elegant way. In case you don't have symbolic math toolbox (like me) this code will do:
N=1024;
a=[429.494;93.112;-6.050];
wavelength=zeros(N,1);
for m=1:N
temp=zeros(3,1);
for n=1:3
temp(n,1)=a(n,1)*(((m-1)/(N-1))^(n-1));
end
wavelength(m,1)=sum(temp);
end
4 Commenti
FSh
il 10 Giu 2019
madhan ravi
il 11 Giu 2019
It’s a homework obviously.
FSh
il 11 Giu 2019
Categorie
Scopri di più su Operations on Numbers 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!