The value assigned to variable <variable_name> might be unused
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Respuestas (3)
Walter Roberson
el 25 de Dic. de 2013
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 comentarios
Image Analyst
el 27 de Dic. de 2013
Editada: Image Analyst
el 27 de Dic. de 2013
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
el 27 de Dic. de 2013
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 comentarios
Walter Roberson
el 27 de Dic. de 2013
Result = MatLab.Execute("addpath('C:\Users\TOSHIBA');")
Result = MatLab.Execute("test2");
n
el 28 de Dic. de 2013
Editada: n
el 28 de Dic. de 2013
11 comentarios
Walter Roberson
el 29 de Dic. de 2013
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.
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




