Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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.
Solved! Go to Solution.
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
Welcome to the forum.
What version of Mathcad are you using?
Mike
Thanks Mike.
Am using Mathcad 15.
--
Dhinesh
I take it you have Office 2003?
Mike
Office 2007.
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
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?
Mike
Thanks Mike.
I plotted graph between r & Z. Its working fine.
--
Dhinesh
Did you use the scripted component?
Mike
Yes, without scripts am not able to extract the variables.
--
Dhinesh
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.
Mike
Here's another solution to this problem (see attachment).
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