Here is an example using bodeoptions, but this is probably a much more basic problem:
opt1 = bodeoptions;
opt1.MagScale = 'log'
opt2 = opt1;
opt1.MagScale = 'linear'
Similarly, changing anything in opt2 changes opt1, too, so it appears opt2 is not another struct but a reference to the same structure as opt1.
Can anybody tell me what's happening here, and in particular: How would I create a copy of opt1 that I can change without changing opt1, too?