MATLAB: How can i add the two numbers specified in field A and B if num.A=2 and num.B=4

structures

I am wondering how to add two fields together that are apart of a specified structure, num. Specifically, what command would be used?

Best Answer

It's not different from two seperate numeric variables: num.C = num.A + num.B