Question

1 clear all close all 2 3 4 5 6 Egivens EO = 3; Sinput voltage ls = 7*10^-14; Svalue of ls R = 200; $value of resistor C = .0need help adjusting my while loop to avoid this error, this is in matlab

0 0
Add a comment Improve this question Transcribed image text
Answer #1

This error is because of your array index is going out of bound.

Means index i is having value more than size of array.

As you have not set limit for i, how many times loop run

your need to change while loop like this :

s = size(Vdiode);

 while  (abs(Vdiode(i+1)- Vdiode(i)) > 10^6 && i+1 <  s)

This will make sure index doesn't exceed the number of elements.

Like, if this helped :)

Add a comment
Know the answer?
Add Answer to:
need help adjusting my while loop to avoid this error, this is in matlab 1 clear...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT