| Thread Closed |
Matlab " Missing Matlab operator" |
Share Thread | Thread Tools |
| Mar16-09, 06:45 AM | #1 |
|
|
Matlab " Missing Matlab operator"
1. The problem statement, all variables and given/known data
i am new to matlab, i am trying to read many images named , salam(1).jpg, salam(2).jpg,...,salam(n).jpg, and i am trying to put that in the imread function as shown in the code below Code:
counter =1;
while (counter<5)
cur=imread('salam(' int2str(counter) ').jpg');
counter=counter+1;
end
Code:
??? cur=imread('salam(' int2str(counter) ').jpg');
|
Error: Missing MATLAB operator.
|
| Mar16-09, 08:15 AM | #2 |
|
|
The problem is that imread is expecting a single string parameter. You need to concatenate the components of the file name, by wrapping them in square brackets:
cur=imread(['salam(' int2str(counter) ').jpg']); -Will Dwinnell Data Mining in MATLAB |
| Mar16-09, 12:34 PM | #3 |
|
|
Thank you very much Predictor, it is working now :)
|
| Thread Closed |
| Thread Tools | |
Similar Threads for: Matlab " Missing Matlab operator"
|
||||
| Thread | Forum | Replies | ||
| black hloes = "missing mass"? | General Astronomy | 5 | ||
| ??? Error: Missing MATLAB operator | Math & Science Software | 2 | ||
| Symbolic intergration in Matlab using "INT" command? | Math & Science Software | 3 | ||
| No "work" done (apparent paradox) What am I missing? | Classical Physics | 10 | ||
| "Closing in on Missing Carbon Sink" - ScienceDaily | Earth | 2 | ||