zvect command from DSP toolbox error fix

5 ビュー (過去 30 日間)
Glenn
Glenn 2024 年 10 月 12 日
コメント済み: Glenn 2024 年 10 月 14 日
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 件のコメント
Umar
Umar 2024 年 10 月 13 日

Hi @Glenn,

Please click the link below

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

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

Hope this helps.

Glenn
Glenn 2024 年 10 月 14 日
! Thanks!

サインインしてコメントする。

採用された回答

Umar
Umar 2024 年 10 月 12 日

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 件のコメント
Glenn
Glenn 2024 年 10 月 12 日
編集済み: Glenn 2024 年 10 月 12 日
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 2024 年 10 月 12 日
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

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Prediction についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by