Expected a string for the parameter name, instead the input type was 'double'. ERROR

Hi, thanks in advance. This is the script I get when running the following code, don't know how to solve it:
numberOfPDE = 1;
pdem = createpde(numberOfPDE);
r1 = [3 4 -.5 .5 .5 -.5 -.8 -.8 .8 .8];
r2 = [3 4 -.05 .05 .05 -.05 -.4 -.4 .4 .4];
gdm = [r1; r2]';
g = decsg(gdm,'R1-R2',['R1'; 'R2']');
geometryFromEdges(pdem,g);
figure
pdegplot(pdem,'EdgeLabels','on');
axis([-.9 .9 -.9 .9]);
title 'Block Geometry With Edge Labels Displayed'
uRight = applyBoundaryCondition(pdem,'neumann','Edge',1,'g',-10);
uLeft = applyBoundaryCondition(pdem,'dirichlet','Edge',6,'u',100);
It is coppied right from the mathworks page. Could anyone help me to solve it? Thank you!

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 12 月 15 日

1 投票

I suspect that you are not using R2016b. The use of 'dirichet' and 'neumann' as parameters is new, with 'face' and 'edge' being used before.
applyBoundaryConditions itself is only a few releases old; it was previously pdeBoundaryConditions

2 件のコメント

JOAN PERE PONSETI
JOAN PERE PONSETI 2016 年 12 月 15 日
That's it, i've just updated Matlab and now it works, thank you!
Walter Roberson
Walter Roberson 2016 年 12 月 15 日
Please Accept the Answer as solving your Question.

サインインしてコメントする。

カテゴリ

質問済み:

2016 年 12 月 15 日

コメント済み:

2016 年 12 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by