If then all the fields should only be numeric.
Structture to mat matlab.
By struct to mat do you mean structure array to a matrix.
What i need it to do is save the pin structure as a mat file with the same name as the original file.
If you do not specify filename the save function saves to a file named matlab mat.
S struct field1 value1 fieldn valuen creates a structure array with multiple fields.
The cell array c contains values copied from the fields of s.
To return the field names in a cell array use the fieldnames function.
Ho can i convert a structure to a matrix.
If you have a mix of strings and numbers then what is your hope as to the datatype of the final matrix.
Verbose either a logical a numeric or a verbose object specifying how much verbose debug information is written to standard output.
You can only combine strings and numbers in a single object if it is one of the composite datatypes such as struct cell or table.
Or do you mean cell array.
Learn more about converting structure to matrix.
C struct2cell s converts a structure into a cell array.
If any of the value inputs is a nonscalar cell array then s has the same dimensions as that cell array.
Find the treasures in matlab central and discover how the community can help you.
It just takes the original csv file that i am reading and saves it to a new directory.
The struct2cell function does not return field names.
Mat something totally different.
Based on your location we recommend that you select.
Since the mat file structure does not contain information about the total size of the structure this argument makes it possible to first write the structure size in bytes to the connection.
If filename has no extension that is no period followed by text and the value of format is not specified then matlab appends mat.
I tried that initially and it doesn t save the structure pin.
If none of the value inputs are cell arrays or if all value inputs that are cell arrays are scalars then s is a scalar structure.
If filename does not include a full path matlab saves to the current folder.