How to increase the number of points to plot for imagesc(Z)

Hi guys,
Initially I'm suppose to plot an image of 2000x2000 metres. So what i did was to make a 2d array of 2000x2000 units. Each unit representing a metre. Calculate values of every single point and and plot using imagesc(Z).
Now, having 2000x2000 units to represent the 2000x2000metres is not enough. So I'm asked to calculate values with more precision (including those in decimals). Should I be increasing it to 200000x200000 units instead? And so 1 unit = 1cm? If i were to do that, there won't be enough memory.
Is there any way to go about this?
Thank you.
Regards, Tonny

2 Comments

Calculating values with more precision is different from calculating more values. What did they ask you for, exactly?
Sorry I wasn't clear enough. I have a formula that for every x and y value, both from 1-2000. Each of those will give me a z value. At the moment, all x and y values are integers. So imagine a grid with all integer coordinates having a z value. I am asked to calculate even for all points including it's decimals. That would mean adding a lot more points.

Sign in to comment.

Answers (2)

Ok,
Have they asked you to calculate a z, for each square meter, each square decimeter, each square centimeter, of square foot or whatever, of have they asked you to calculate z, to more precision for each square meter? Or both?
If you go with decimeters (1/10th of a meter), you only need a maximum of 8 (assuming z is a double), * 20000 * 20000, which is 3.2GB. You're right, if you go with centimeters, it likely won't work.
If z is simply being calculated to the nearest whole number, all you need to do is stop the rounding.

4 Comments

Or were they asking for a smaller area of higher precision?
Hi Lain,
I initially calculated z for each square meter for 2000x2000m. But they say it's not enough. They want me to calculate for every decimeter, square centimeter or even smaller if possible.
The range of 2000x2000m still remains the same. Also the z values are all of extremely small numbers of 0.000001 to 0.001 values.
As this program i'm writing basically pre-compute all z values first in 2d array A. And have another 1000x1000 2d array B for other purpose. Even with decimeters, I won't have enough memory.
I'm thinking if there is no other way, I might consider requesting to decrease the range from 2000x200m to 1000x1000m.
Are they concerned with having the data, rather than displaying it?
If they want to have the data, just write it to file?
they're more concern with displaying actually.

Sign in to comment.

Do they have a monitor with 20000 x 20000 or 200000 x 200000 pixels? Do they even have 2000 x 2000 ? (possible but uncommon).
If what they want is to be able to zoom into an area to display it at a finer resolution, then consider the possibility of calculating the values as they request them. If the formula is not too time consuming then this would work much better than trying to handle all the data at the same time.
If the formula is time consuming to process then the standard mechanism would be to pre-calculate in patches and store the patches in files and load and display the appropriate tiles as needed. The TIFF class can help with that.

Asked:

on 3 Mar 2014

Answered:

on 3 Mar 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!