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.

create valid COMSOL solution from MATLAB vector

Please login with a confirmed email address before reporting spam

Hi Community,
I need to create a valid COMSOL solution from a MATLAB vector. In 3.5a I could use the femsol function.
I have tried these commands on an existing solution but received the error "Solution not initialized"

PVals = model.sol('sol1').getPVals
PNames = model.sol('sol1').getPNames
model.sol('sol1').clearSolution()
model.sol('sol1').setU(-0.1*ones(size(model.sol('sol1').getU)))
model.sol('sol1').setPVals(PVals)
model.sol('sol1').setPNames(PNames)
model.sol('sol1').createSolution()

Any help is appreciated!

0 Replies Last Post 2010年6月3日 GMT-4 14:50
COMSOL Moderator

Hello Laurin Wissmeier

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.