Clear Filters
Clear Filters

zvect command from DSP toolbox error fix

52 views (last 30 days)
Glenn
Glenn on 12 Oct 2024 at 2:41
Commented: Glenn on 14 Oct 2024 at 21:46
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.
  3 Comments
Umar
Umar on 13 Oct 2024 at 2:13

Hi @Glenn,

Please click the link below

https://www.matlab.gatech.edu/

& Visit Section “For More Information”, it should help.

Hope this helps.

Sign in to comment.

Accepted Answer

Umar
Umar on 12 Oct 2024 at 3:13

Hi @Glenn,

Please refer to this documentation by clicking the link below and let me know if this helps resolve your problem.

https://www.mathworks.com/matlabcentral/answers/27898-dsp-first-toolbox-for-matlab

  2 Comments
Glenn
Glenn on 12 Oct 2024 at 3:21
Edited: Glenn on 12 Oct 2024 at 3:32
It is the same issue, yes, but it doesn't solve the problem because it sets the line on the graph to the color white, which can't be seen because the graph background is white. I actually already fixed the problem, if you read what I wrote above, I was just hoping to get in contact with the propper people to get the zvect.m command fixed so we can all stop stumbling upon this error. Thanks though.
Umar
Umar on 12 Oct 2024 at 3:38
Hi @Glenn,
I reviewed your edited comments. Hopefully, by clicking the link below will help get this issue resolved.
https://supportcases.mathworks.com/mwsupport/s/casecreation?language=en_US&c__caseParameter=Report_a_Bug&s_tid=srl22_br

Sign in to comment.

More Answers (0)

Products


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!