Skip to main content
1-Visitor
November 9, 2014
Solved

Substitute in a programm...

  • November 9, 2014
  • 2 replies
  • 3563 views

Hi

just looked over some old custom functions from Tom Gutman.

He sometimes uses substitute in his functions, but I cannot fiugure out how he types it IN the programm.

looks something like:

if I try to explicitly type subsittute (ersetzen) it gets interpreted as a variable, if I use the symbolic -> subsittute it gets writen besides the funvction-definition.

Cannot figure it out for MC 15 and MCP3?

What's the trick?

Need this to define a gradient function in MC

Thnkx

Werner

Best answer by Werner_E

WERNER CYRMON wrote:

Bin da vom Prinzip völlig bei dir. Aber bei uns an der HTl wurde die Entscheidung für Prime (modernere Oberfläche) getroffen und nun häng ich da drin. Für die meisten Sachen gehts ja eh ganz gut, aber wenn man a bisserl was spezielleres will (finde auch keine funktionierende Version von implicitplot3d) dann hakts halt.

LG retour nach Wien (ich glaube es war HTL Donaustadt) und nice weekend

Werner

BTW: Nachtrag - geht nicht in Prime. Man kann syntaktisch die doppelte Ersetzung so nicht eingeben (Klammernsetzung) und die Zeile ist nicht in die Funktion hineinkopierbar.

Ich habs befürchtet, dass es da in Prime Probleme geben könnte.

Und wenn ich mir die Qualität der 3D-plots in Prime ansehe würd ich nicht einmal ansatzweise daran denken, hier so etwas wie implicitplot3d() zu implementieren.

Sich immer nur für das Neueste zu entscheiden ist nicht unbedingt die beste Strategie. Obwohl es im Grunde ja unfassbar ist, was sich PTC da leistet. Und ein Außenstehender kann ja beim besten Willen nicht annehmen, dass eine Nachfolgesoftware in der Version 3 im Vergleich zur 8 Jahre alten Vorgängerversion Schrott ist. Eklatant langsamer ist, trotz "moderner" Oberfläche gravierend umständlicher zu bedienen ist, eine unglaubliche Fülle von Funktionalität vermissen lässt (geskriptete Komponenten, Animationen, ....) und das, was da ist, meist auch von deutlich minderer Qualität ist (2D und vor allem 3D plots).

Wir sehen uns jetzt u.a. auch Matlab an - da gibst ein unglaublich günstiges Angebot für eine schulweite Lizenz, welche auch die Schülergeräte inkludiert. Natürlich ist Matlab mehr eine Programmierumgebung und kein so nettes Dokumentationstool wie Mathcad. Aber ich seh leider keine Zukunft für Prime - das wird so schnell nich um so vieles beser als es sein aollte.

2 replies

1-Visitor
November 9, 2014

||...

||g <- g substitute, x = 3 ->

|| ...

Just looked over some of my old post, seems not wo work in MC15 and Prime anymore 😞

So how do I implement a gradient function?

Something like

f(x,y,z)=x^2+y^2+z^3 v=[x y z]

gradient(f,v) -> [2x 2y 2z]

Can't figure out how to differenziate symbolicly in the programm loop ....

25-Diamond I
November 9, 2014

WERNER CYRMON wrote:

||...

||g <- g substitute, x = 3 ->

|| ...

Just looked over some of my old post, seems not wo work in MC15 and Prime anymore 😞

So how do I implement a gradient function?

Something like

f(x,y,z)=x^2+y^2+z^3 v=[x y z]

gradient(f,v) -> [2x 2y 2z]

Hopefully 3z^2 😉

A gradient operator is already implemented in Mathcad.

1.png

Any way, what you want to achieve should be doable. Years ago I wrote a sheet which would solve a lienar ODE of first order symbolically and the integration variable was an argument to that function.

It was very tricky to implement this and it would require that I substitute the varaible of integration by a different variable in the program and only then integration worked. Then again a resubstitution to get back the real variable of integration yielded the desired result. This still works in Mathcad 15. Haven't tried in Prime as that program is such a useless crap.

1-Visitor
November 9, 2014

@Werner Nope, the Gradient function of MC15 is gone in Prime, at least I can't finde, hence all the trouble 😉

WIll try your trick with subst and resubst

Thx

Werner

BTW:; Hopefully 3z^2 😉

Du siehst, ich brauche drindend eine Funktion ide das rechnet 😉

25-Diamond I
November 9, 2014

You can't simply paste pictures here, you have to use the appropriate button at the top to insert pics.

According symbolic command inside a program - you have to type the symbolic expression outside the program and then copy and paste it in your program.

You have to be aware that a lot of Toms functions won't work in Mathcad 15 because of the change of the symbolics engine from Maple (in Mathcad 11) to MuPad.