I have a vector of size 1*152.Now i want to find the next prime number of every number present in the vector..
Ex: My vector is a=[2 4 7 8] i want the output as [2 5 7 11]..i.e., if the number is a prime then that number will be the output i.e., like 2 and 7 in the given example...
I tried using nextprime like below it gives the following error:
Undefined function 'nextprime' for input arguments of type 'sym'.
Undefined function 'nextprime' for input arguments of type 'double'.