Unable to perform assignment because the left and right sides have a different number of elements.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
JACINTA ONWUKA
am 22 Nov. 2020
Bearbeitet: JACINTA ONWUKA
am 24 Nov. 2020
Please I need help with my code, it is giving me this error and I can't fix it. Thanks for helping...
0 Kommentare
Akzeptierte Antwort
KSSV
am 22 Nov. 2020
The error is clear; when you try to save more number of elements in an array which initialized with less number.
Example:
A = zeros (1.10);
A (1) = rand;
A (2) = rand (1,2); % this will throw error, you have to save only one element but you are saving two elements
In your case, check what is dimension of RHS created and what dimension LHS is initialized.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Operators and Elementary Operations finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!