Hello,
I am a student using the 2024a version of Matlab with the DSP toolkit.
I have been trying to figure out why when using the zvect command, i recieve this error
Input:
w=[-1+6*j,j]
zvect(w)
Output:
Error using plot
Invalid color, marker, or line style.
Error in zvect (line 80)
h = plot(real([zFrom;zTo]), imag([zFrom;zTo]), linetype,...
Error in LAB2 (line 10)
zvect(w)
Weird, right? So I'm looking into the file zvect.m and notice that the version check is the main culprit because of these lines (starting at line 27)
vv = version;
if( vv(1)>='5')
linetype = 'b-';
else
linetype = 'w:-'; %<--- WHITE is NOT good in v5
end
From this code, it pulls the version number of my 2024a as '2' which is less than '5', so it sets the linetype to 'w:-' which is incompatible with 2024a.
I ran Matlab as admin and typed in 'edit zvect.m' in the console,
Then editing the if line to
if( str2num(vv(1:2))>=5)
Fixes the error and now I can use the command without issue on my laptop.
I just thought I would post here in the hopes of getting this fixed by the devs.
I know from my class, there were several students having this issue(we were probably on different versions 2023,2024..etc), this ultimately forced to use an older version of matlab that was installed on the school's computer. Sorry if this is the wrong board to post this in.