Data types

String

What is a string?

It is a sequnece of charitors

What is a string considered to be?

A row vector

Structure

How to you create a struct?
structure.name = 'ben'
structure.age = 19
What does isfield() do?
isfield(structure,'NameOfKey')
% checks to see if the feild or key exists
% returns 0 if false
% returns 1 if true
What does rmfield() do?
rmfield(structure,'NameOfKey')
%deletes that field from that structure
What does setfield() do?
setfield(structure,'NameOfKey', value)
%this creates a new field with said value
What does struct() do?
structure = struct('fieldName', value, 'feildName', value)
% creates a new structure with data above ^^^
Can you create a structure within a structure?

Yes

Cells