getting error in for loop
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Array indices must be positive integers or logical values.
Error in Untitled4 (line 27)
Idsat(i)=r1*(Vgs-(r2)+Vds(i));
for i=0:length(Vds)
Idsat(i)=r1*(Vgs-(r2)+Vds(i));
end
1 comentario
Sam Chak
el 30 de Mayo de 2022
Have you checked if your array indices are positive integers or logical values?
Respuestas (2)
Nudrat Sufiyan
el 30 de Mayo de 2022
7 comentarios
Torsten
el 30 de Mayo de 2022
@Nudrat Sufiyan comment moved here
It means I should change the value of r2
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!