# Matlab Missing Matlab operator

#### Salam

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)
counter=counter+1;
end
but i am getting the following error

Code:
???         cur=imread('salam(' int2str(counter) ').jpg');
|
Error: Missing MATLAB operator.

Last edited:
Related Engineering and Comp. Sci. Homework News on Phys.org

#### Predictor

Re: Matlab " Missing Matlab operator"

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:

-Will Dwinnell
http://matlabdatamining.blogspot.com/" [Broken]

Last edited by a moderator:

#### Salam

Re: Matlab " Missing Matlab operator"

Thank you very much Predictor, it is working now :)

"Matlab Missing Matlab operator"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving