MATLAB Answers

0

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

Asked by Arkanra Kadhum on 19 Feb 2019
Latest activity Commented on by Arkanra Kadhum on 19 Feb 2019
Hi every body
I have been used Mathlab Fun to sort ten values. but I get error
Parse error: The expression to the left of the equals sign is not a valid target for an assignment.
Please let us know what is the error description.
function B = selectionSort( Vc, Vc1, Vc2, Vc3, Vc4, Vc5, Vc6, Vc7,Vc8,Vc9)
{
A=[ Vc Vc1 Vc2 Vc3 Vc4 Vc5 Vc6 Vc7 Vc8 Vc9]
B : sort(A)
}

  0 Comments

Sign in to comment.

1 Answer

Answer by madhan ravi
on 19 Feb 2019

Remove curly braces.
B=sort(A);
Numbering variables is not recommended.

  3 Comments

Arkanra Kadhum's answer moved here:
thank you
the error in the statement
A=[ Vc Vc1 Vc2 Vc3 Vc4 Vc5 Vc6 Vc7 Vc8 Vc9]
it accepet only when I write A==[ Vc Vc1 Vc2 Vc3 Vc4 Vc5 Vc6 Vc7 Vc8 Vc9]
bes regards
Arkan

Sign in to comment.