Skip to main content
1-Visitor
March 8, 2016
Question

help!.. how can i plot a 3d surface graph from 3 columns of data i've got in excel?

  • March 8, 2016
  • 2 replies
  • 5316 views

hi, this can't be hard can it?.. am new to mathcad and am trying to import 3 columns x12 rows of excel data by copy/paste into a table and/or a matrix etc with the intention of plotting on a 3d surface graph

...I can paste the values into the mathcad matrix ok but can't seem to assign a variable name to the matrix... so graph can't load it (nor can anything else refer to it I suppose)

...the table rows/columns aren't read in from the excel data - they are presumed 0, 1, 2 etc - so axes are preset to 0, 1, 2... rather than 1st 2 columns of data in excel file - graph just plots 3 columns of data imported as if they were functions f({0, 1, 2}, {0, 1, 2})... which seems a bit dim ...(my 3 columns in excel are the x, y, z) function should be {excel col3} = f({excel col1}, {excel col2})

I must be missing something obvious - can anyone help?

lots of thanks

2 replies

23-Emerald I
March 8, 2016

In version 15, it's not hard:

  1. select the data in EXCEL and copy
  2. In version 15, type your matrix name and :=, then paste.  And you have your matrix.

In Prime, I believe it's a bit more complicated.  Insert an EXCEL component, paste the data into the component, and define your matrix from the component.

23-Emerald V
March 9, 2016

dave norman wrote:

hi, this can't be hard can it?.. am new to mathcad and am trying to import 3 columns x12 rows of excel data by copy/paste into a table and/or a matrix etc with the intention of plotting on a 3d surface graph

...I can paste the values into the mathcad matrix ok but can't seem to assign a variable name to the matrix... so graph can't load it (nor can anything else refer to it I suppose)

...the table rows/columns aren't read in from the excel data - they are presumed 0, 1, 2 etc - so axes are preset to 0, 1, 2... rather than 1st 2 columns of data in excel file - graph just plots 3 columns of data imported as if they were functions f({0, 1, 2}, {0, 1, 2})... which seems a bit dim ...(my 3 columns in excel are the x, y, z) function should be {excel col3} = f({excel col1}, {excel col2})

I must be missing something obvious - can anyone help?

lots of thanks

dnorman1-VisitorAuthor
1-Visitor
March 9, 2016

thanks for this - it's a brilliant reply!..

it's almost exactly what I wanted to do... but just one last thing... the x, y axes are labelled according to the row/column number of the data - can the x/y axes range be labelled from the min/max x, y values in the matrix array instead? (i.e. if the x value was say temperature, it would make sense to have the x-axis showing the temperature range, not just which row/column the data came from...)

ok.. hope clear to understand

25-Diamond I
March 11, 2016

> can anyone do better than my excel plot using Mathcad?

You would have to define "better".

So far you had not mentioned what you expected to see exactly. You just asked for "plotting a 3d surface graph" and the Excel plot you just showed and seem to be happy with sure is not what I would call a surface plot.

You must keep in mind, that Mathcad is a math program for engineers and while it provides a bunch of functions for data analysis its main goal is not statistics. So the possibilities for pie charts, bar charts etc. are rather limited.