Parse error in matlab2tikz

조회 수: 9 (최근 30일)
Bell
Bell 2024년 4월 9일
댓글: Bell 2024년 4월 10일
I just learned about matlab2tikz and when i tried a small example,
t=0:1e-4:1;
plot(t,sin(t));
matlab2tikz("C:\Users\user\Documents\MATLAB\src\tes1t.tex")
It threw the following error:
Error using m2tInputParser>parse
m2tInputParser: invalid input
Error in matlab2tikz (line 251)
ipp = ipp.parse(ipp, varargin{:});
I'm a beginner, and don't have much idea what the errors mean and their solution. I tried the test files in included with matlab2tikz and they gice the same error. I'm on matlab 2022b. Thanks for any help.

채택된 답변

Abhishek Kumar Singh
Abhishek Kumar Singh 2024년 4월 9일
Hi Bell,
The error you're encountering with matlab2tikz suggests that there's an issue with how the function's arguments are being parsed. This could be due to several reasons, but it's most likely due to incorrect syntax and/or unsupported arguments type provided the path provided for the output file is correct.
Instead of string input, which you are providing, it expects a char array.
Try out the following command and most likely it will work:
matlab2tikz('C:\Users\user\Documents\MATLAB\src\tes1t.tex')
  댓글 수: 1
Bell
Bell 2024년 4월 10일
Thanks a lot! That worked out!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by