Unrecognized function using PDE toolbox
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
DGM
le 6 Juil 2022
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.
Réponses (1)
Steven Lord
le 6 Juil 2022
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 commentaires
Steven Lord
le 7 Juil 2022
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
Voir également
Catégories
En savoir plus sur Geometry and Mesh dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!