Page 1 of 1

Incorrect number of right hand side elements in dot name assignment. Missing [] around left hand side is a likely cause

Posted: Fri Dec 16, 2016 9:37 pm
by matlab1
tf

Re: Incorrect number of right hand side elements in dot name assignment. Missing [] around left hand side is a likely c

Posted: Sun Dec 27, 2020 8:41 pm
by matlab1
This error can happen when you use
setfield

For assignment of a matrix to a field in a structure.

Instead of using setfield, try to use direct assignment

for example :

var.in = [8 9]

instead of using,

var = setfield(var,'in',[8 9])