I have a problem and hope, anybody can help me with that.
I have density data dependig on temperature and pressure. The data are stored in an excel file (in a square block - see attachment). Is there an easy way to import this data in Maple, that I can use several values of the density at given a pressure and temperature? Maybe comparable with a table (or matrix) where you can pick out indexed values, e.g. rho[temperature,pressure].
My current solution is to write a procedure, but before that I would like to know if there is an easyer way.
Another point is, how to plot this data. A possibility is with matrixplot, but the values of the x and y axis are not related with the given pressure and temperature but with the row and column numbers.
ExcelTools:-Import
Do the values in Matrix M appear correct, if you run this code below?
A := ExcelTools:-Import("Density.xls"); interface(rtablesize=50): M:=Matrix(A);There are several plotting choices available. This is just one such (presuming that I've interpreted the data structure ok),
plots:-pointplot3d([seq(seq([M[i,1],M[3,j],M[i,j]],j=2..6),i=4..11)], axes=boxed,symbol=solidcircle, labels=[Temperature,Pressure,Density]);acer
ExcelTools
> with(ExcelTools): A:= Import("6629_Density.xls"); Temperature:= convert(A[4..11,1],list); Pressure:= convert(A[3,2..6],list); Density:= Matrix(A[4..11,2..6]); plots[surfdata]([seq([seq([Temperature[i],Pressure[j],Density[i,j]],j=1..5)],i=1..8)], axes=box,labels=['T','P','D']);