How to set correct number of arguments in map.rasterref.MapCellsReference ?
    3 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
I am using following matlab code to create Raster Map
% Create the MapCellsReference object with the correct parameters
R = map.rasterref.MapCellsReference(...
    croppedImageSize, xlimits, ylimits, ...
    'ColumnsStartFrom', 'west', ...
    'RowsStartFrom', 'north');
However, it gives following error
Error using map.rasterref.MapCellsReference (line 254)
Incorrect number of arguments.
please suggest me correct arguments.
kuldeep
0 Commenti
Risposte (1)
  Jayanti
 il 1 Ott 2024
        Hi Kuldeep,
To solve this issue, you can set this property after creating the object since I think these properties are not part of the constructor's argument list. I am also attaching code for your reference. 
R = map.rasterref.MapCellsReference();
R.RasterSize = croppedImageSize;
R.XWorldLimits = xlimits;
R.YWorldLimits = ylimits;
R.ColumnsStartFrom = 'north';  
R.RowsStartFrom = 'west'; 
The recommended way to create object of MapCellsReference is using functions like readgeoraster which you can refer in the below link:
Hope it helps!
0 Commenti
Vedere anche
Categorie
				Scopri di più su Matrix Indexing 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!