Consider the matlab function that describe in the image.
As I run this function, I get that y = 1 insted of y = 7 as expected.
Why is this happening?
any response will be appreciated.
Thanks!
Because the while
gets false
from the first iteration and stop.
use while (a>=v(j))
to resolve your issue.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.