0

I am trying to figure a way to add a specific value to a struct field in MATLAB. For example:

a.w = a.w + 12;

But I get the following error message:

Error using + Too many input arguments.

Any suggestions?

Adriaan
  • 17,741
  • 7
  • 42
  • 75
popist
  • 83
  • 8
  • What is the content of `a.w`? If it is a simple number, it works. Example: `a.w=1; a.w=a.w+12;` will return `13`. – hbaderts Jan 10 '16 at 13:50
  • I see you've been around SO lately, welcome! Please take a few minutes to read the [editing-help](http://stackoverflow.com/editing-help) on how to format your questions. This will help in the readability and findability of your questions and other users won't have to edit your question. – Adriaan Jan 10 '16 at 13:50
  • a.w has many values. For example a(1).w = 1, a(2).w = 5, a(3).w = 6..... – popist Jan 10 '16 at 13:52
  • @Adriaan you are right. I'm sorry. I will – popist Jan 10 '16 at 13:54

0 Answers0