See picture for details.
I'm running Matlab 2015b with pde toolbox, yet some functions from that release (eg. interpolateSolution) are missing. Functions that were introduced earlier in this toolbox work fine. Any ideas what I can do to use these new functions?
Cheers
Doug

 채택된 답변

per isakson
per isakson 2017년 3월 15일
편집: per isakson 2017년 3월 15일

1 개 추천

interpolateSolution &nbsp is obviously a method of three different classes
&nbsp
thus the first argument of the call must be an instance of one of those classes.
And those classes are in the package, pde.
&nbsp
Added later
>> version
ans =
9.0.0.341360 (R2016a)

댓글 수: 6

Thanks for your answer, Per. Now
help pde.PDEResults.interpolateSolution
gives me the info, however when I try and test it with some data I get the error:
The class pde.PDEResults has no Constant property or Static method named 'interpolateSolution'.
Why could this be?
You need to call interpolationSolution with a results object (from the solvepde function, as shown in the examples on the documentation page for interpolationSolution) of one of those three classes as the first input.
myResults = solvepde(pdemodel);
interpolationSolution(myResults, ...)
Douglas Bock
Douglas Bock 2017년 3월 15일
I do not have solvepde as that was introduced in 2016. I am using pdenonlin instead, which doesn't return an object but a vector.
So in order to use interpolateSolution (available from 2015) I need to pass it an object which is created by solvepde (available from 2016)??? That doesn't seem right!
per isakson
per isakson 2017년 3월 15일
편집: per isakson 2017년 3월 15일
Yes, solvepde was introduced in R2016a. The R2016a documentation says
&nbsp
Thus, you have to use one of the old solvers. I found this in the R2015b release notes
&nbsp
Hope this answers the question. Obviously, R2015b is in the middle of a transition and the documentation could have been better.
Sorry, I didn't consider the fact that the function may have changed between the release you were using and the current release whose documentation I was reading.
Looking at the examples on the documentation page for interpolateSolution in release R2015b you will need to create a results object using createPDEResults and pass that object into interpolateSolution. Using the example from the documentation for pdenonlin:
% Create and set up the model
model = createpde;
geometryFromEdges(model,@circleg);
a = 0;
f = 0;
c = '1./sqrt(1+ux.^2+uy.^2)';
boundaryfun = @(region,state)region.x.^2;
applyBoundaryCondition(model,'Edge',...
1:model.Geometry.NumEdges,...
'u',boundaryfun,'Vectorized','on');
generateMesh(model,'Hmax',0.1);
% Solve the PDE
u = pdenonlin(model,c,a,f);
% Create the results object
results = createPDEResults(model, u)
% Interpolate the solution
IS = interpolateSolution(results, ...
-0.5:0.125:0.5, ...
-0.5:0.125:0.5)
Douglas Bock
Douglas Bock 2017년 3월 16일
Wonderful! Thanks to both Steven and Per!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품

질문:

2017년 3월 15일

댓글:

2017년 3월 16일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by