Please help: I have a model in Comsol. I want to output y displacement result at some points [73 74 113 114 151 154 191 194 229 234 269] in the model. But the code is outputing the displacement in the entire domain.

model.result.create('pg5', 'PlotGroup1D');

model.result('pg5').run;

model.result('pg5').create('ptgr1', 'PointGraph');

model.result('pg5').feature('ptgr1').selection.set([73 74 113 114 151 154 191 194 229 234 269]);

model.result('pg5').feature('ptgr1').set('expr', 'v');

model.result('pg5').feature('ptgr1').set('descr', 'Displacement field, Y component');

model.result('pg5').run;

model.result.export.create('data1', 'Data');

model.result.export('data1').set('expr', {'v'});

model.result.export('data1').set('descr', {'descr', 'Displacement field, Y component'});

model.result.export('data1').set('filename', 'xl_disp.txt');

model.result.export('data1').run;

pause(2)

load xl_disp.txt

save('xl_disp','xl_disp')

load('xl_disp','-mat','xl_disp')

Also, I tried this:

mpheval(model, 'expr', 'v', '[73 74 113 114 151 154 191 194 229 234 269]')

But it did not work.

Thank you.

More Samuel Ayinde's questions See All
Similar questions and discussions