Hello, i have a little problem with my function.
Below is my function,
A=input('Input the components of a vector, separated by spaces or commas:\n','s');vector=str2num(A);fprintf('you entered %d\n',vector)
MATLAB gives me this results. (Let's take 1,2,3 as the example for vector)
you entered 1you entered 2you entered 3you entered 4
I want the results to appear like this instead
you entered 1 2 3 4
Is there any way in doing that or there is something wrong with my function?
Thanks in advance
Best Answer