Hi All,
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...
Hi All,
Does anyone if it's possibe to use the 'exist' function in Matlab to check whether any data has been entered into a particular field of a structure. I'd like something like the following, where 'identification' is a user-input variable, 'team' is the structure and 'city' is the field...
Hi,
The code you've written doesn't quite apply to this problem, though it works if the user manually inputs the iteration number.
My issue is that I don't want the user to have to specify the iteration before the data is stored, which means that the structure 'plant' needs to be previously...
Hi Pythagorean,
I can find the number of elements within the matrix of a particular field using either the numel or the size functions. However, I'm not sure of the syntax that checks the size of the existing matrix (via one of the functions mentioned) and makes the incoming data an extension...
Hi all,
I've created a structure containing various fields of data. The data in these fields is stored in matrices and is be added to at regular intervals. I'd like the system to identify the amount of inputs the fields already contain and then extend said matrices to include this new data...
Thanks for the response, but I'm sure if genvarname is what I need (I don't think I explained myself very well before).
I have a variety of plants, each individually labelled and have set up some Matlab code to analyse certain properties such as height etc. when photos are uploaded.
I'd like...
Hi all,
I'm trying to create a program that takes a user input and uses this input as the name of a cell array. I'm looking for something like the following:
id = input('Please Enter Plant I.D: ')
>> 112
% The system then calls the cell array named 112
% The user is then asked to...