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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Plotting graph using excel data in Mathcad

dm-3
1-Newbie

Plotting graph using excel data in Mathcad

Hi,

I need to plot a graph in Mathcad using data imported from excel. The calculation is an integral calculation performed in excel.

The graph will give the pattern profile of a two wheeler tyre.

The calculation sheet is attached herewith.

1 ACCEPTED SOLUTION

Accepted Solutions
MikeArmstrong
5-Regular Member
(To:dm-3)

Firstly you need to call your data in Mathcad, see attached. This worksheet uses a scripted component and allows data to be called from multiple sheets from Excel placing them in a nested Matrix. All you need to do is change the file path to your own directory.

Mathcad has a builkt in function wich can do this, but I maze well pass this worksheet as I have just modified it to suit you, as I thought you only had Office 2003.

What variables to you want to plot against each other?

Mike

View solution in original post

16 REPLIES 16
MikeArmstrong
5-Regular Member
(To:dm-3)

Welcome to the forum.

What version of Mathcad are you using?

Mike

Thanks Mike.

Am using Mathcad 15.

--

Dhinesh

MikeArmstrong
5-Regular Member
(To:dm-3)

I take it you have Office 2003?

Mike

Office 2007.

MikeArmstrong
5-Regular Member
(To:dm-3)

Firstly you need to call your data in Mathcad, see attached. This worksheet uses a scripted component and allows data to be called from multiple sheets from Excel placing them in a nested Matrix. All you need to do is change the file path to your own directory.

Mathcad has a builkt in function wich can do this, but I maze well pass this worksheet as I have just modified it to suit you, as I thought you only had Office 2003.

What variables to you want to plot against each other?

Mike

Mike,

I want to plot graph between "r" and "Z" (column O in excel sheet).

My idea is to use to use the existing excel calculation to plot graph and gradually to build the entire calculation in Mathcad.

--

Dhinesh

MikeArmstrong
5-Regular Member
(To:dm-3)

Going on that basis, see attached.

I haven't produced the plots, just called the data in from Excel.

Is the graph below what your after?

Clipboard01.jpg

Mike

Thanks Mike.

I plotted graph between r & Z. Its working fine.

--

Dhinesh

MikeArmstrong
5-Regular Member
(To:dm-3)

Did you use the scripted component?

Mike

Yes, without scripts am not able to extract the variables.

--

Dhinesh

MikeArmstrong
5-Regular Member
(To:dm-3)

I have included an alternative, which is Mathcad's built in function, READEXCEL. This will eliminate the need for a scripted component, but you will need to save your excel file in 2007 format.

Mike

One last point.

Clipboard01.jpg

Mike

VladimirN
24-Ruby II
(To:dm-3)

Here's another solution to this problem (see attachment).

MikeArmstrong
5-Regular Member
(To:VladimirN)

Yes,

Was that worksheet posted by Raiko? I'm sure I recognize it. The problem with this approach is that all worksheet within Excel have to numbered sequentially, but in this case they are not.

Mike

Right I have been forced to add another example now

Inputting the filename and path can be a little cumbersome and tedious, but this push button scripted component posted by Philip Oakley removes the pain of manually typing the the file path in. The button allows the user to select the require file.

Mike

Top Tags