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

Basic question about MATLAB programming
Post Reply
matlab1
Site Admin
Posts: 4797
Joined: Thu Dec 15, 2016 9:30 am
Contact:

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

Post 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])
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests