Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Complicated(?) subscript

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-25-2018
08:37 AM

01-25-2018
08:37 AM

I'm having trouble entering the subscript "n-1" after "prev" The - 1 doesn't stay with n as part of subscript.

Any suggestions? I'm using PTC Mathcad Prime 3.1

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-25-2018
09:17 AM

01-25-2018
09:17 AM

How are you accessing the subscript? There are two ways to put in a subscript:

- A literal subscript is part of the variable name, accessed by "cntrl -"
- A vector or array index subscript, accessed by "["

5 REPLIES 5

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-25-2018
09:09 AM

01-25-2018
09:09 AM

Re: Complicated(?) subscript

Please attach your Mathcad Prime worksheet in archive to the message.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-25-2018
09:17 AM

01-25-2018
09:17 AM

How are you accessing the subscript? There are two ways to put in a subscript:

- A literal subscript is part of the variable name, accessed by "cntrl -"
- A vector or array index subscript, accessed by "["

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-25-2018
09:22 AM

01-25-2018
09:22 AM

Re: Complicated(?) subscript

After converting?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-25-2018
11:26 AM

01-25-2018
11:26 AM

Re: Complicated(?) subscript

Guess the variable the derivative is taken wrt can't be a vector element.

Workaround could be to assign the derivative function to a function func1(prev) and then use that function with the indexed prev[n as argument.

But in Prime you should be able to use the prime symbol ' instead of the derivative operator. Then it should work the way you had set up even with an indexed prev.

EDIT

I guess I misunderstood your problem in the first place. What you posted works, but your goal is to get rid of the variable prev and use the vector element t_(n-1) directly.

This also does not work with the Prime operator.

As a workaround you could define a local function in your program with the name func'. here the ' is the normal apostrophe, not the Prime symbol from the "operators" menu. On the RHS you either use the prime symbol as shown or the derivative operator you had used.

But why would you use a full vector t of values when you only need two variables? You do not return the vector, so it looks like you are not interested in the intermediate approximations.

Furthermore you may notice, that the precision of root depends on the value of the system variable TOL. If this variable is too high (default is 10^-3) your routine will never stop at t_new = check because check is too inaccurate,

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-25-2018
03:51 PM

01-25-2018
03:51 PM

Re: Complicated(?) subscript

[ did the trick. Many Thanks!