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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Exporting a function plot from mathcad to excel

MortezaA
1-Visitor

Exporting a function plot from mathcad to excel

I have this complicated function S(x,y,z) which also reads from previously defined functions. The plot capabilities of mathcas is nowhere near publication quality. I wanted to somehow transfer this plot to another software that has acceptable plotting abilities (e.g. Excel) but I can't find any way to do that. can someone please help me?

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:MortezaA)

So its simply a function S(x), no matter if S() is calling other functions as well. You would only need a vector of x values and a corresponding vector of S values.

Simply create a suitable vector xvec of x-values (you have to decide about lower/upper limit and stepwidth) and then write Svec:=S(xvec) to get your vector of function values. Probably you will have to vectorize the latter expression - that depends on the functions in use. You may make it in any case to be on the safe side.

View solution in original post

4 REPLIES 4
Werner_E
25-Diamond I
(To:MortezaA)

Simply create vectors of x , y, z and S values and use e.g. WRITEEXCEL() to export the data to an Excel sheet. Then in Excel you recreate the plot depending on the data columns. But as you describe it you have a 4D hypersurface to plot (3 independent variables) - that may be hard for Excel, too . You may even have a hard time finding 3D plot capabilities in Excel.

BTW, Excel isn't much better when it comes to publication quality - people just seem to get used to Excel plots, though. You may have to look at a specialized program like Origin or another software in that catagory.

I was not clear describing the problem before. assume my S function is in this form S(x , y(x) , z(x), f(x) , g(x)) and also I dont know how to make a vector from a function.

Werner_E
25-Diamond I
(To:MortezaA)

So its simply a function S(x), no matter if S() is calling other functions as well. You would only need a vector of x values and a corresponding vector of S values.

Simply create a suitable vector xvec of x-values (you have to decide about lower/upper limit and stepwidth) and then write Svec:=S(xvec) to get your vector of function values. Probably you will have to vectorize the latter expression - that depends on the functions in use. You may make it in any case to be on the safe side.

Werner_E
25-Diamond I
(To:MortezaA)

I dont know how to make a vector from a function.

The attached sheet should help

Announcements

Top Tags