Why does MATLAB return a "not enough input arguments" error when I try to launch visdiff with proper number of arguments from windows command prompt?

Hopefully this is an easy question. Below is the exact command that I have typed into my windows command line, assume models I want to compare are model1 and model2.
C:/"Program Files/MATLAB/R2019a/bin/"matlab.exe -r visdiff('model1','model2')
MATLAB launches properly, however I get this:
Typing the visdiff command directly into MATLAB works without issue.
Going into the visdiff.m line referenced, I see this is an argument check (narginchk(2, 3)) which apparently checks to ensure there are either two or three arguments.
What am I missing?

 채택된 답변

Wrap the command in double quotes.
matlab -r "disp('hello world')"
Compare with the result you get from:
matlab -r disp('hellow world')

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Annotations에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

2020년 10월 15일

댓글:

2020년 10월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by