Unrecognized function using PDE toolbox
6 次查看(过去 30 天)
显示 更早的评论
Hello,
I am trying to run the exact code from this example:
But I get an error for unrecognized function 'addCell'. I have the PDE toolbox installed (checked using ver command).
I am able to plot and use functions like 'createpde' as in this example:
So I'm not sure why the 'addCell' function is not working. I appreciate any help on this.
1 个评论
DGM
2022-7-6
I don't have PDE toolbox or a new enough version, but this should be the relevant tool
introduced in R2021a
As to why it's not showing up, I don't know.
回答(1 个)
Steven Lord
2022-7-6
According to the addCell documentation page, the input arguments you pass into addCell must be a "3-D geometry, specified as a DiscreteGeometry object."
Are you calling addCell with two DiscreteGeometry objects or are you trying to call it with something else like a numeric array? If the latter, that won't work.
2 个评论
Steven Lord
2022-7-7
coreGm = multicylinder(0.03,0.1);
coilGm = multicylinder([0.05 0.07],0.2,"Void",[1 0]);
airGm = multicylinder(1,2);
coreGm = translate(coreGm,[0 0 1.025]);
coilGm = translate(coilGm,[0 0 0.9]);
gm = addCell(airGm,coreGm);
gm = addCell(gm,coilGm)
Can you set a breakpoint on the line with the first addCell call and execute the following command when MATLAB stops at the breakpoint, or can you add the command immediately before that call?
whos
I want to see what classes airGm, coreGm, and coilGm are. I'm curious if you have a multicylinder or translate function that's somehow taking precedence over the ones in Partial Differential Equations Toolbox and those functions are causing one of those variables not to be what you expect. While you're at it, seeing the output of these commands might be useful too.
which -all multicylinder
which -all translate
which -all addCell
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geometry and Mesh 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!