Skip to main content
1-Visitor
March 3, 2017
Solved

Scale in 2d plot

  • March 3, 2017
  • 3 replies
  • 3471 views

Hello all,

I have two questions regarding the use of the 2d interpolation function:

  1. As you can see in the attached file, I cannot display the x-axis in the right way.
  2. How can I use the fit function for the get the results from an input array?

Thank.you very much!

Enrico

Best answer by Fred_Kohlhepp

A standard 3D plot of a 2D array uses array indices for X and Y  axis.  To plot the FIT function, use "CreateMesh"

3 replies

21-Topaz II
March 3, 2017

Hi Enrico Belmonte,

You have simply to remake the 3d plot, as I have done:

Belmonte.jpg

Saluti

FM

ebelmonte1-VisitorAuthor
1-Visitor
March 3, 2017

Hello FM,

Thank-you for your reply.

However on the x-axis I get vales between 0 and 10 and not between 1E4 and 2E4.

What about the second question?

Thank-you very much!

Enrico

21-Topaz II
March 3, 2017

It seems to me that it's okay!?!?

Belmonte.jpg

Furhermore, you can use the following program for a more accurate plot, but with the condition that the input matrix be a square one:

Belmonte 1.jpg

Example of "fitfield" use, plotting the function f(x,y)=sin(x)*sin(y)/(xy)

Belmonte 2.jpg

23-Emerald I
March 3, 2017

A standard 3D plot of a 2D array uses array indices for X and Y  axis.  To plot the FIT function, use "CreateMesh"

25-Diamond I
March 3, 2017
  1. As you can see in the attached file, I cannot display the x-axis in the right way.

Guess its easier than you think:

Using the first method (directly plotting the fit function) you would have to provide the ranges for x and y and also the number of grid in the "3D-Plot Format" window in the "Quickplot" tab.

So generally using Createmesh provides more flexibility and usually is the preferred method.

  1. How can I use the fit function for the get the results from an input array?

Input array? not sure what you want to achieve.

ebelmonte1-VisitorAuthor
1-Visitor
March 7, 2017

Dear Mr. Exinger,

Thank-you for your reply.

I would like to calculate the fitting function using two input arrays instead of computing the values of the fitting function for a couple of values only.

Thank-you very much!

Enrico

25-Diamond I
March 7, 2017

Guess you need to use vectorization: