Hi All,(adsbygoogle = window.adsbygoogle || []).push({});

I've written some code in Matlab that calculates a number of parameters and saves the data to a structure. A portion of the code is shown below:

uniqueName = genvarname(date);

plant(id).(uniqueName) = {date avgHeight avgVol};

.

The various parameters such as avgHeight etc. are defined earlier in the program. The confusing thing is that the code works fine when 'id' is a single digit number. However, when 'id' >= 10, the program returns the following error:

.

??? Insufficient outputs from right hand side to satisfy comma separated

list expansion on left hand side. Missing [] are the most likely cause.

.

I don't understand the error message and don't know what to do next.

Any help I receive will be greatly appreciated.

Thanks very much for your time,

Craig

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matlab: Problem with structures

Loading...

Similar Threads for Matlab Problem structures |
---|

MATLAB MATLAB: forces acting on an object |

MATLAB Matlab histogram |

MATLAB Sovling Bernoulli's differential equation in matlab? |

MATLAB Matlab-like software |

MATLAB Does anyone had this plotting problem with MATLAB? |

**Physics Forums | Science Articles, Homework Help, Discussion**