フィルターのクリア

Error Message and Paths

1 回表示 (過去 30 日間)
Suzzie
Suzzie 2011 年 1 月 26 日
When you get an error message that reads like this:
Error: File: FinProject_ImgAlign.m
Line: 3
Column: 18
The expression to the left of the equals sign is not a valid target for an assignment.
the code showing the paths:
LabelDir = '/Users/suzzie/Documents/MATLAB/FaceRec/TestDir/'
imgDir = '/Users/suzzie/Documents/MATLAB/FaceRec/TestDir/FaceImages/'
DestDir = imgDir = '/Users/suzzie/Documents/MATLAB/FaceRec/TestDir/AlignedFaceImages/'
Please what do you do? I am running MATLAB on a Mac system.
  3 件のコメント
Suzzie
Suzzie 2011 年 1 月 30 日
line 3: DestDir = imgDir = '/Users/suzzie/Documents/MATLAB/FaceRec/TestDir/AlignedFaceImages/'
matlab version: 7.10 (r2010a)
Siddharth Shankar
Siddharth Shankar 2011 年 1 月 30 日
Suzzie, why are you assigning a different value to imgDir on two consecutive lines?

サインインしてコメントする。

回答 (1 件)

Vieniava
Vieniava 2011 年 1 月 27 日
I think your code suppose to look like this:
LabelDir = '/Users/suzzie/Documents/MATLAB/FaceRec/TestDir/'
imgDir = '/Users/suzzie/Documents/MATLAB/FaceRec/TestDir/FaceImages/'
DestDir ='/Users/suzzie/Documents/MATLAB/FaceRec/TestDir/AlignedFaceImages/'
The cause of an error was the third line. You are not allowed to make (double) assigment like:
DestDir = imgDir = 'string'
  1 件のコメント
Oleg Komarov
Oleg Komarov 2011 年 1 月 27 日
Now I get the problem:
1) I agree with Vieniava
2) If the whole code is defined on a single line, then separate each assignments with ;
Ex:
LabelDir = '/Users/suzzie/Documents/MATLAB/FaceRec/TestDir/'; imgDir = '/Users/suzzie/Documents/MATLAB/FaceRec/TestDir/FaceImages/'

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by