Why work space matrix values correct for matrix xx(56,24) but not when listed in command window?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Clive Dorman
el 11 de Mzo. de 2022
Comentada: Clive Dorman
el 11 de Mzo. de 2022
A matrix xx(56. 24) has correct values in workspace but not in command window. However, xx has correct values in command window if listed as a single row vector, as xx(10,:), but not if listed as a single column vector xx(:,10), and not if listed as complete matrix xx(:,:), or simply xx. New values in xx in command window have swapped out all real temperature data with zeros. However, values in command window keeps correct values of -9.99 which are coastlines and in their correct matrix location so that the coastline is plotted correctly with contour(lon, lat, xx), but not temperature data.
Matrix was initially read in by xx = ncread(filename,'sst'). The lat and lon read in by same method were correct in command window and workspace.
0 comentarios
Respuesta aceptada
Walter Roberson
el 11 de Mzo. de 2022
Give the command
format long g
Now ask again to display the data
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!