% 1. Load model and run solution for default time window of 0 to 1s: model = simple_example; % 2. Update time window to 1 to 2s: tlist_str = 'range(1,0.1,2)'; model.study('std1').feature('time').set('tlist',tlist_str); model.sol('sol1').feature('t1').set('tlist',tlist_str); % 3. Set initial conditions to previous solution: model.sol('sol1').feature('v1').set('initmethod', 'sol'); model.sol('sol1').feature('v1').set('initsol', 'sol1'); % 4. Arbitrarily modify position to simulate some external disturbance: new_x = 2; model.init('init1').set('root.mod1.x',num2str(new_x)); % 5. Run the solver for the new time window: model.sol('sol1').runAll; % 6. View results for current time window: mphplot(model,'pg1'); % Comment: I expected to see the initial x value (blue curve) for this % solution window to be the value of new_x, not the final value of x % from previous solution. It seems as though method invoked in step 4 % is irrelevant when the methods invoked in step 3 are invoked.