The value assigned to variable <variable_name> might be unused
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Réponses (3)
Walter Roberson
le 25 Déc 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 commentaires
Image Analyst
le 27 Déc 2013
Modifié(e) : Image Analyst
le 27 Déc 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
le 27 Déc 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 commentaires
Walter Roberson
le 27 Déc 2013
Result = MatLab.Execute("addpath('C:\Users\TOSHIBA');")
Result = MatLab.Execute("test2");
n
le 28 Déc 2013
Modifié(e) : n
le 28 Déc 2013
11 commentaires
Walter Roberson
le 29 Déc 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.
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




