Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 26527

extracting data from comsol to matlab through mphinterp

$
0
0
Hello,

I have implemented the mphinterp function but when I want to extract results for different parameters something goes wrong.

My typical comsolfiles look something like this:

- In the Study section I have Step1: Boundary Mode Analysis and in Step 2: Frequency Domain Analysis (and in front of these two a Parametric sweep)

- I have 3 data sets in the Result section : Solution 1, Solution 2, Solution 3 and Solution 3 is the one that contains the parametric sweep (e.g. 24 different parameter combinations)

In my MATLAB file I have a for loop that loops over all parameter numbers

for i=1:nr_param
...
mphinterp(model1,'emw.normE','coord',grid3D,'Dataset','Solution 3','Solnum',i);
...
end

I extract emw.normE from model1 for a given grid3D. I select the dataset Solution3 and in 'Solnum' I select each time another parameter i (determined by the for loop). But it already errors with Solution 3. If I only put

mphinterp(model1,'emw.normE','coord',grid3D,'Solnum',i);

then I can extract one parameter, but from the second one it again errors.

Could somebody please tell me what is going wrong in the above scheme. So how can I exactly say matlab that I want to extract emw.normE from Solution 3 and that it only extracts one parameter at a time?


Thanks in advance,
F.Peyskens

Viewing all articles
Browse latest Browse all 26527

Trending Articles