Skip to main content
1-Visitor
June 9, 2019
Solved

Problem with 'substitute' in Mathcad15

  • June 9, 2019
  • 2 replies
  • 7791 views

I tried to follow advice given in another thread to do this (See file):

Mathcad complains about the units of 's', but that's not the problem. I want to substitute i*omega for s.  Under Symbolics, Variable > substitute is greyed out. Pressing CTRL-SHFT-. gives a place holder, which disappears, followed by the arrow shown. I tried re-starting Mathcad, but I still get the same problem. Of course, Mathcad says s is undefined, but I suppose it wouldn't need to be defined for the substitution operation.

Best answer by Werner_E

Not sure what you are looking for at the end of the day, but wouldn't Terry's approach be all you need? Without any symbolic "substitute".

Or is your goal to apply some further symbolic manipulations on F after the substitution?

P.S.: I would suggest to use a literal index for your constants omega.1, etc. instead of a vector index. The way you defined those constants you had defined a 5 element vector omega (first element being 0 as Mathcads first index is by default 0, not 1). I guess you did not intend to define a vector omega, right?

B.png

2 replies

21-Topaz II
June 9, 2019

Hi,

fdt.jpg

1-Visitor
June 9, 2019

I adopted your syntax, but I still can't get 'substitute' to appear.

21-Topaz II
June 9, 2019

You should define omega as an independent variable and define the constant values of omega with the dot and not omega as a vector.. Furthermore I think that you will find difficulties when plotting the function with omega defined as a vector.

About the substitution you should follow the following procedure:

fdt1.jpg

21-Topaz II
June 9, 2019

Hi,

 

Capture.PNG

The above is a problem as s is undefined so MathCad is taking the value of s as 1 second by default.

In the first function F (which has a green highlight) uses s as a parameter to the function so s is defined in the right hand side as it gets passed into the function. s's scope is limited to the function F.  It is not defined as s in the scope of the document.

The green highlight shows that F is also a predefined unit in mathcad.  Good habit is to use more than one symbol to define functions

Capture-2.PNG 

In the above when you call F(the first one) by use of F(gamma).  Gamma is defined on the worksheet so the message "undefined variable" message disappears.

Note the second function F(now with a green highlight) is also a redefinition of the first F.

Capture-4.PNG

F2 is now a function that does not overwrite first function F.

F2 has as a parameter omega.  F2 is simply F with a passed in parameter i*omega that is substituted for s in F

 

Cheers

Terry

 

23-Emerald IV
June 9, 2019

Yes, F is a predefined unit, for Farad.

But in this case F gets a green underline because F() is a function (too), the F-distribution...

 

Luc