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
- :
- Re: Mathcad Prime 4.0 Integration problem and Plot...

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

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

12-09-2018
08:51 AM

12-09-2018
08:51 AM

Hey Guys,

I have a problem in Mathcad Prime 4.0 related to Integration problem and Plotting Problem NEED HELP ASAP Please ( File attached )

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

12-09-2018
05:29 PM

12-09-2018
05:29 PM

Just noticed that you wrote that you are using Prime 4 and so you would not be able to read my file.

Unfortunately to convert the sheet from P5 to P4 I would have to copy every single region from the P5 sheet to a newly created P4 sheet, which is something I refuse to do.

I remember that Luc a while ago wrote that it would be possible to put all regions in an area and copy the whole collapsed area to a P4 sheet. I gave it a try but unfortunately it did not work at all.

So all I can do at the moment is provide a pdf printout of the file I posted.

9 REPLIES 9

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

12-09-2018
10:14 AM

12-09-2018
10:14 AM

Re: Mathcad Prime 4.0 Integration problem and Plotting Problem NEED HELP ASAP ( File attached )

There are several problems in your sheet.

Solve the problems, then come back if needed.

Success!

Luc

Highlighted
##

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

12-09-2018
10:40 AM

12-09-2018
10:40 AM

Re: Mathcad Prime 4.0 Integration problem and Plotting Problem NEED HELP ASAP ( File attached )

Thank you so much, the graph has been solved but for the integration it doesn't want to be solved.

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

12-09-2018
10:52 AM

12-09-2018
10:52 AM

Re: Mathcad Prime 4.0 Integration problem and Plotting Problem NEED HELP ASAP ( File attached )

In addition to those Luc pointed out:

- You need to set ORIGIN to 1 or you create a spurious element at the front of each array.
- you don't define a function: , I don't understand why this works at all.

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

12-09-2018
03:46 PM

12-09-2018
03:46 PM

Re: Mathcad Prime 4.0 Integration problem and Plotting Problem NEED HELP ASAP ( File attached )

The integration still didn't work

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

12-09-2018
04:04 PM

12-09-2018
04:04 PM

Re: Mathcad Prime 4.0 Integration problem and Plotting Problem NEED HELP ASAP ( File attached )

@FredKohlhepp wrote:

In addition to those Luc pointed out:

- You need to set ORIGIN to 1 or you create a spurious element at the front of each array.
- you don't define a function: , I don't understand why this works at all.

He had defined k as a vector.

In Prime you can access the elements of a vector either as we are used by k[2 or alternatively by k(2). A little bit confusing for us long term users but in accordance with other math packages.

So the function definition for G() works OK, but the function sure does not do what the OP has in mind as omega is interpreted as vector index and it will fail for non-integer values of omega.

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

12-09-2018
04:38 PM

12-09-2018
04:38 PM

Re: Mathcad Prime 4.0 Integration problem and Plotting Problem NEED HELP ASAP ( File attached )

This mixture of vectors and functions is quite a mess and you seem to have confused yourself with it.

I would strongly suggest setting up all calculations as functions of omega and getting rid of any vectors completely.

After all this is math program and not a spreadsheet!

See the attached Prime 5 file how this could be done.

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

12-09-2018
05:29 PM

12-09-2018
05:29 PM

Just noticed that you wrote that you are using Prime 4 and so you would not be able to read my file.

Unfortunately to convert the sheet from P5 to P4 I would have to copy every single region from the P5 sheet to a newly created P4 sheet, which is something I refuse to do.

I remember that Luc a while ago wrote that it would be possible to put all regions in an area and copy the whole collapsed area to a P4 sheet. I gave it a try but unfortunately it did not work at all.

So all I can do at the moment is provide a pdf printout of the file I posted.

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

12-10-2018
06:27 AM

12-10-2018
06:27 AM

Re: Mathcad Prime 4.0 Integration problem and Plotting Problem NEED HELP ASAP ( File attached )

Oh man!! you are brilliant, it worked and yes the curves became smooth and that's exactly the way it should be. Thank you so so much, Really appreciate it and I would like to thank the other members for their help also.

I wanna understand something, so I can save it in my mind and correct my misunderstanding. I wrote ( omega * w* ) as index to i 'cause I wanted it to be for the array n from 1 to 200 that's why I was writing w (index i ) , T ( index i ) etc... But as you showed that is not necessary to make it as ( index ) to draw it for the range of n. So I wanna understand this ( how the program understood that is in n range, although we didn't put index for the range ? ).

Thanks in advance Werner.

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

12-10-2018
09:51 AM

12-10-2018
09:51 AM

Re: Mathcad Prime 4.0 Integration problem and Plotting Problem NEED HELP ASAP ( File attached )

You have to distinguish between ranges and vectors.

If you write i:=0,1 .. 10 you have created a range variable which is some kind of implicit loop. Ranges should be used to index vectors and matrices and for plotting.

If you later write x[i:=i*3 you created a vector with 11 elements [0;3;...30]. Thats the way your sheet worked initially. You created a couple of vectors and plotted one vector over the other. This was also the reason your integrals did not work as you can integrate a math function but not a vector.

What I did basically was that I turned x from a vector into a math function by writing x(i):=i*3 and we don't need the range i for that. Indeed you could use any variable as formal function parameter like x(a):=a*3.

Now you can evaluate x at any position and if you write x(1.2)= you will get 3.6 as answer.

The purpose range omega I created in my modified sheet was just done for plotting purpose and its only this range I used the values of deltaomega and n which are defined at the top. I used a smaller step deltaomega (and therefore larger n) to get a smoother curve. You can do plots without defining a range but a range gives you more control over start and stop value and step width.

That range omega has no influence on any other calculations but as it occupies the variable name omega its sometimes a better idea to name it differently, like omega_plot or the like.

Top Tags