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
- :
- Help with programming

Options

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

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

Showing results for

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

12-12-2019
12:26 AM

12-12-2019
12:26 AM

Help with programming

Hey I have a question. Since I am still quite new to this software, if you think my question is easy, please help me out. Suppose I have a value calculated at the end with different parameters. Wondering if there is any way that for each parameter, I can create a matrix or excel with two columns, one is the parameter number, and the other is the corresponding value, when keeping others constant.

Thanks a lot!

Labels:

8 REPLIES 8

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

12-12-2019
03:45 AM

12-12-2019
03:45 AM

Re: Help with programming

Hi,

It is easy to do what you are after, but first -> which version are you using?

Cheers

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

12-12-2019
11:14 AM

12-12-2019
11:14 AM

Re: Help with programming

I am using mathcad prime 2. Thanks!

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

12-12-2019
05:37 AM

12-12-2019
05:37 AM

Re: Help with programming

here we go.

I've added a MatCad 15 file that shows the idea.

Raiko

P.S.

had to edit, since I've uploaded wrong file.

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

12-12-2019
11:19 AM

12-12-2019
11:19 AM

Re: Help with programming

Hi Thanks a lot for your reply!

The problem I have is that the outcome variable is not a simple equation and it's been calculated after 5 or 6 pages with many other parameters too (even though we can keep other parameters constant). Wondering how you solve the problem in this case?

Thanks again!

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

12-12-2019
02:55 PM

12-12-2019
02:55 PM

Re: Help with programming

Its stabbing in the dark without seeing what you do, but I guess you would have to turn every calculation, which uses the parameters you would like to vary at the end, into functions dependent on those parameters.

With long winded calculations as you describe it this can be pretty cumbersome and result in a wild looking worksheet.

It has bee a long standing wish of the community to be able to turn a whole worksheet into a function of a number of selectable arguments but as development is running now, that kind of wishes never will be fulfilled.

While I don't like the approach - Raikos way to start with vectors of input values right from the start, vectorize the calculations to end up with a vector of result values should work with long winded calculations as well (and possibly will look cleaner compared to the suggested functional approach). Where do you see a problem with that?

Guess it would help if you post a worksheet to show what exactly you are trying to attempt (a simplified one showing only the important things would be preferred).

BTW, as you obviously could read Raikos MC15 worksheet, you seem to have MC15 installed along with Prime 2. Why do you bother to use Prime 2 when MC15 is at your hand?

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

12-12-2019
07:06 PM

12-12-2019
07:06 PM

Re: Help with programming

Thank you SO MUCH for your kind reply!

I am not quite sure if I want to continue in this way rather than simply manually get the results. One reason for me to hesitate is that for those long winded calculations, there are already matrices. I am afraid the vectorization of parameters would make the worksheet look too crazy.

I will try to upload a worksheet I am working soon.

Thanks a lot again!

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

12-12-2019
07:50 PM

12-12-2019
07:50 PM

Re: Help with programming

that for those long winded calculations, there are already matrices. I am afraid the vectorization of parameters would make the worksheet look too crazy.

Even worse! If your calcs already use matrices, then the approach with the vectors of input values and vectorization might not work at all, because vectorization is applied to ALL matrices in the vectorized expression.

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

12-13-2019
03:36 PM

12-13-2019
03:36 PM

Re: Help with programming

Thank you very much!