Surfplot Whole Numbers: Using the Data Cursor Tool

  • Thread starter johnkubik
  • Start date
  • Tags
    Numbers
In summary, the user wants their surfplot to only show whole numbers when they use the data cursor tool. Right now, when they use the data cursor it shows x=1.058 y=3.5, z=9.5. The user wants it to only evaluate the function x, 0->100 and y, 0->100 in increments of 1.
  • #1
johnkubik
15
0
I would like my surfplot to only show whole numbers when I use the data cursor tool. Right now when I use the data cursor it shows x=1.058 y=3.5, z=9.5.

How can I make it so it only evaluates my function over whole numbers, and displays only whole number answers?

example:

ezsurf('3*x*y+4*x+3*y+3', [0,100])

I would like it to only evaluate the function x, 0->100 and y, 0->100 in increments of 1.

Thank you in advance!
 
Physics news on Phys.org
  • #2
Bump?
 
  • #3
Perhaps if you create a 101x101 matrix of values for your expression and find a way to plot that matrix as a surface and then you read this

http://www.mathworks.com/help/matla...aying-data-values-interactively.html#f4-44251

where it describes "snapping to the nearest data vertex" then you might be able to accomplish what you are looking for.

But that is just a wild guess
 
  • #4
thanks for the response. I am going to give it a try.
 
  • #5
No go, it still does stuff like:

x:11.47
y:19.1
z:1.04e04

Annoying!

I just want it to do whole numbers.
 
  • #6
Did you make a 101x101 matrix of (integer) individual values and then plot that?
Or did you plot a continuous (real) function 3*x*y+4*x+3*y+3 over 0:100 x 0:100?

Did you then look at that Matlab web page that tells how to set the mouse pointer to jump to the nearest data point, which should have been some integer x and some integer y?
Or did you not set the mouse pointer to jump to the nearest (integer) data point?

I think I understand what you want to do.
The question is whether you are doing what that web page describes or not.
Or whether perhaps that web page applies to your problem or not.

Computers, and software in particular, are annoying. That is life.
 
Last edited:
  • #7
Ended up doing a for loop to build a matrix. Then using the plot3. It is working correctly now.
 

Related to Surfplot Whole Numbers: Using the Data Cursor Tool

1. What is Surfplot Whole Numbers and how is it used?

Surfplot Whole Numbers is a data visualization tool used to display and analyze numerical data in a surfplot format. It allows users to plot and manipulate whole numbers on a graph to identify patterns and trends.

2. What is the Data Cursor Tool and how does it work?

The Data Cursor Tool is a feature within Surfplot Whole Numbers that allows users to interactively view and retrieve specific data points on the graph. It works by clicking on a data point, which displays the corresponding values in a pop-up box.

3. Can I customize the appearance of my surfplot graph?

Yes, you can customize the appearance of your surfplot graph by changing the colors, labels, and axis scales. You can also add a title and customize the legend to make your graph more visually appealing and informative.

4. How can I export my surfplot graph for use in other programs?

You can export your surfplot graph as an image or a data file by using the "Save As" function. This will allow you to use your graph in other programs such as Microsoft Excel or Word.

5. Is there a limit to the amount of data I can plot on a surfplot graph?

The amount of data you can plot on a surfplot graph may vary depending on the capabilities of your computer and the amount of memory available. However, Surfplot Whole Numbers is designed to handle large datasets and can handle up to thousands of data points without any issues.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
159
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
14
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
791
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • General Math
Replies
5
Views
1K
Back
Top