[Scilab-users] unable to find my mistake in the function
Sachverständigenbüro Niedermaier Holger
fachbueroniedermaier at bayern-mail.de
Tue Jun 6 10:27:50 CEST 2017
Dear all,
may anybody be able to explain why I get the error message "invalid index in line 12“ by running the following function?
function [Wert]=Berechnungsfunktion(von, bis, schrittweite, y0, y2, t0, t2)
for n=1:3
t(1)=t0;
y(1,n)=y0;
schritte=(bis-von)/schrittweite;
for i=1:schritte
t(i+1)=t(i)+schrittweite;
y(i+1,n)=10^(log10(y0*Faktor(n))+log10(y2/y0)/log10(t2/t0)*log10(t(i+1)/t0))
end
disp(n)
for i=1:schritte
Energie(n)=Energie(n)+y(i)*y(i)*schrittweite*10^(-3);
end
disp(Energie(n))
end
//disp("1 Polig",Energie(3),"2 Polig", Energie(1),"3 Polig", Energie(2))
//Wert=[Energie];
endfunction
I myself be to blind to find my mistake
Thanks a lot
Holger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170606/def278cf/attachment.htm>
More information about the users
mailing list