Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Cannot extract data from two datasets properly
Posted 19 dic 2014, 10:11 GMT-5 Interfacing Version 4.4 1 Reply
Please login with a confirmed email address before reporting spam
I'm using COMSOl 4.4 LiveLink with Matlab (R2012b).
I've run a time-dependent simulation with two studies, where I've implemented a stop condition for the first time-dependent study, and then used the solution from the first study as the initial condition for the second study.
The problem I'm having is that the first solution contains 44 time points, while the second solution contains 197 time points. When I load the model into Matlab and try to use mphglobal, for instance, to extract data from the second data set, it only gives me the first 44 time points' worth of data. Am I missing something?
When I access the solution information of the model using mphsolutioninfo(model), it shows me that the two datasets have the proper size (see below):
>> info.sol3
ans =
dataset: {'dset3' 'dset4'}
study: 'std2'
sequencetype: 'SolverSequence'
values: {[1x197 double]}
parameters: {'t'}
mapheaders: {'t' 'Inner' 'Outer'}
map: [197x3 double]
>> info.sol1
ans =
dataset: 'dset1'
study: 'std1'
sequencetype: 'SolverSequence'
values: {[1x44 double]}
parameters: {'t'}
mapheaders: {'t' 'Inner' 'Outer'}
map: [44x3 double]
Any suggestions?
Thanks
Dave
I've run a time-dependent simulation with two studies, where I've implemented a stop condition for the first time-dependent study, and then used the solution from the first study as the initial condition for the second study.
The problem I'm having is that the first solution contains 44 time points, while the second solution contains 197 time points. When I load the model into Matlab and try to use mphglobal, for instance, to extract data from the second data set, it only gives me the first 44 time points' worth of data. Am I missing something?
When I access the solution information of the model using mphsolutioninfo(model), it shows me that the two datasets have the proper size (see below):
>> info.sol3
ans =
dataset: {'dset3' 'dset4'}
study: 'std2'
sequencetype: 'SolverSequence'
values: {[1x197 double]}
parameters: {'t'}
mapheaders: {'t' 'Inner' 'Outer'}
map: [197x3 double]
>> info.sol1
ans =
dataset: 'dset1'
study: 'std1'
sequencetype: 'SolverSequence'
values: {[1x44 double]}
parameters: {'t'}
mapheaders: {'t' 'Inner' 'Outer'}
map: [44x3 double]
Any suggestions?
Thanks
Dave
1 Reply Last Post 19 dic 2014, 11:16 GMT-5