Hello all,

For some reason I am getting the left of equals sign is not valid for assignment. I don't see why this may be so. I have a variable on the left and a value on the right. I know this error is common if you do something like "6 = c". However I am doing it the other way around but still get the error.

Here is the important portion of my code..

...

quotient = floor(number/26);

remainder = rem(26, number);

%set qLetter to an empty string

qLetter = '';

%if quotient is equal to 0, leave qLetter as it is

if(quotient == 0){

;

}

%if quotient is not equal to 0, convert quotient to the corresponding

%letter

else {

qLetter = int_to_letter(quotient);

}

end

...

I am getting the error after my first and only else, where I am assigning qLetter to another string.

Thanks all!

Hi, is int_to_letter() something you have written? why not num2str().

x = 1;

if (x==2)

sprintf('%d',x)

else

qLetter=num2str(x)

end

Wayne

Delete the curly brackets in your code. Matlab is not C.

Bruno

Bruno

1. Less Than Or Equal To "=" Sign becomes Equal "=" sign.

2. The expression to the left of the equals sign is not a valid target for an assignment.

3. please explain the the function to left of equals sign

4. If cell is left blank, or equals zero, then cell equals a different cell

5. If cell is left blank, or equals zero, then cell equals a differen

6. If cell is left blank, or equals zero, then cell equals a diff

7. Why a plus sign after the equal sign?

8. CountIF(A9:A20, B9 not equal B10, B10 not equal B11, etc.)

9. "not a valid target for an assignment" problem

10. Which font includes the "not equal to" sign

11. automatic equal sign that is NOT WANTED

12. why does Equal sign not appear on the formula bar

13. Hyperlinks ending in "=" do not highlight/include the ending equal sign

14. How do I type in a "not equal to" sign in Microsoft Word?

15. in word how to get the not equals sign, ie = with a slash through

3 post • Page:**1** of **1**