Hello, i am very new to MATLAB and have stumbled upon something (hopefully extremely simple) that i cannot seem to understand.
I am simply trying to make a function that prints the entered values of a vector entered in the function. It results in a = a, a = b and a = c. The b and c in the second and third prints are completely ignored.
function p62(a,b,c)fprintf('a = %.1f\n',a)fprintf('b = %.1f\n',b)fprintf('c = %.1f\n',c)end
I tried to replace a, b and c (not in the function but in the prints) with p62(1), p62(2) and p62(3), but it only accepts p62(1) and gives error for p62(2) and p62(3). I hope you understand!
Best Answer