The value assigned to variable <variable_name> might be unused
조회 수: 12 (최근 30일)
이전 댓글 표시
please can any one solve these errors of some lines that have red underline because i am novice in matlab and i don't know the basics
here the code :

all of these lines have the same M-Lint warning "The value assigned to variable variable_name might be unused"
>> variable name which has red underline
thank you
댓글 수: 1
답변 (3개)
Walter Roberson
2013년 12월 25일
On lines 4 and 7, add the comment
%#OK
at the end of the line.
Change line 12 to
fclose(Fid);
rather than being an assignment.
댓글 수: 7
Image Analyst
2013년 12월 27일
편집: Image Analyst
2013년 12월 27일
Spaces may be messing you up. MATLAB may be interpreting it as two different strings unless you wrap in single quotes. So instead of this:
Result = MatLab.Execute("cd D:\university\sem9\voicebox toolbox")
try this:
Result = MatLab.Execute("cd 'D:/university/sem9/voicebox toolbox'")
Also try forward slashes, which MATLAB and Windows are just fine with:
Result = MatLab.Execute("C:/Users/TOSHIBA/test2.m")
just in case it's using the backslash to indicate a special character like \t or \n.
Walter Roberson
2013년 12월 27일
C:\Users\TOSHIBA\test2
is not a valid MATLAB command.
Use addpath() to add C:\Users\TOSHIBA to your MATLAB path, and then use
test2
Alternately, code
Result = MatLab.Execute("run('C:\Users\TOSHIBA\test2.m')")
댓글 수: 3
Walter Roberson
2013년 12월 27일
Result = MatLab.Execute("addpath('C:\Users\TOSHIBA');")
Result = MatLab.Execute("test2");
n
2013년 12월 28일
편집: n
2013년 12월 28일
댓글 수: 11
Walter Roberson
2013년 12월 29일
Neither Image Analyst nor I have experience with that kind of audio work.
Have you now isolated the problem as being with your signal-processing and not with the VB to MATLAB interface? If so then it would be time to open a new third Question for the signal processing part.
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




