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

5 views (last 30 days)
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
Oliver Woodford
Oliver Woodford on 3 Mar 2014
Calculating values with more precision is different from calculating more values. What did they ask you for, exactly?
Tonny
Tonny on 3 Mar 2014
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)

Iain
Iain on 3 Mar 2014
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
Iain
Iain on 3 Mar 2014
Are they concerned with having the data, rather than displaying it?
If they want to have the data, just write it to file?

Sign in to comment.


Walter Roberson
Walter Roberson on 3 Mar 2014
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.

Categories

Find more on 3-D Scene Control in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!