cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Problem assigning Index

fahmed-2
13-Aquamarine

Problem assigning Index

Hello,

 

I am trying to generate roots using Mathcad but I guess I am unable to define the index properly. Please help me as what can I do to solve. My version is Prime 5.0

 

 

Thanks,

 

Faisal

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:fahmed-2)


@fahmed-2 wrote:

I think I found a solution.


Vectorization as suggested above does the job as well and a bit more elegant, I guess.

 

Your program with "Match" and "trim" would throw an error if the function a(..) once returns a vector without a single value being 0 or less. You may use "try..catch" to cope with this or look at my suggestion below.

B.png

Worksheet attached.

 

View solution in original post

8 REPLIES 8
Werner_E
25-Diamond I
(To:fahmed-2)

The problem is the equal sign after the definition of your function "a".

Delete it and it should work.

 

But now you get a unit mismatch because something with your function f is wrong.

You try to add unit-less (the first sine summand) and a summand which hast the unit Pa/m. This can't work.

B.png

fahmed-2
13-Aquamarine
(To:Werner_E)

Thank you for your reply. Yes, you are right the units of alpha should be per meter but still it does not work. I want my variable "a" to be defined such that it is a function of alpha, d, and x.

LucMeekes
23-Emerald III
(To:fahmed-2)

There is no problem, as long as you follow up all advice given. See attachment.

(Or did I miss something?)

 

Success!
Luc

Werner_E
25-Diamond I
(To:fahmed-2)


@fahmed-2 wrote:

Thank you for your reply. Yes, you are right the units of alpha should be per meter but still it does not work. I want my variable "a" to be defined such that it is a function of alpha, d, and x.


Which indeed it is.

You did not attach your new file so we do not see where your new sheet fails and what the error message is.

Best guess is that you forgot to vectorize:

B.png

 

Hi Faisal,

 

You can use headers and footers on the page to insert the heading, name, and dates.

The relevant bits are found on the ribbon as Document tab, Headers and footers section.

 

This allows the document to expand and shrink as necessary.  Your document has 31 pages but uses only a few.

 

Cheers

Terry

I think I found a solution.

Werner_E
25-Diamond I
(To:fahmed-2)


@fahmed-2 wrote:

I think I found a solution.


Vectorization as suggested above does the job as well and a bit more elegant, I guess.

 

Your program with "Match" and "trim" would throw an error if the function a(..) once returns a vector without a single value being 0 or less. You may use "try..catch" to cope with this or look at my suggestion below.

B.png

Worksheet attached.

 

fahmed-2
13-Aquamarine
(To:Werner_E)

Thank you very much for your help

Announcements

Top Tags