'MATLAB calls function every time I compile the file
I am fairly new to MATLAB, and I wrote the following function to rotate a vector by 90 degrees anticlockwise.
function w = rotate(v)
R=[0,-1;1,0];
w=R*v;
end
but every time I compile the file, MATLAB calls rotate with an argument v which I have not defined yet, which leads to an error. How do I stop MATLAB from calling this function when I compile the file? I have tried to fiddle with the Run icon but the most I was able to do was to give a different input to rotate every time I compiled the file. (I'm using MATLAB R2020a)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
