introduction to programming with matlab - Vanderbilt University week-7 assignment 2 solutions

 while-loop Practice


These solutions are for reference only.

It is recommended that you should solve the assignment and quiz by yourself honestly then only it makes sense to complete the course.

but if you cant figure out some part of it than you can refer these solutions

make sure you understand the solution  

dont just copy paste it

-----------------------------------------

function number = next_prime(number)

    while ~isprime(number + 1)

        number = number + 1;

    end

    number = number + 1;

end



main course : https://www.coursera.org/learn/matlab

No comments

darkmode