Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
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 Commenti
Oliver Woodford
Oliver Woodford il 3 Mar 2014
Calculating values with more precision is different from calculating more values. What did they ask you for, exactly?
Tonny
Tonny il 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.

Accedi per commentare.

Risposte (2)

Iain
Iain il 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 Commenti
Iain
Iain il 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?
Tonny
Tonny il 3 Mar 2014
they're more concern with displaying actually.

Accedi per commentare.


Walter Roberson
Walter Roberson il 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.

Categorie

Scopri di più su 3-D Scene Control in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by