MATLAB: How to save a specific field from struct as mat file

structstructures

A.a = 1;
A.b = 2 ;
A.c = 3;
save('new_c', 'A.c')
In Line 4 I'm getting the floowing error:
Error using save
'A.c' is not a valid variable name.
How to do this. Please help.

Best Answer

A.a = 1;
A.b = 2 ;
A.c = 3;
save('new_c', '-struct', 'A', 'c')