Skip to content
Snippets Groups Projects
Commit 697aaadc authored by jacques.grelet_ird.fr's avatar jacques.grelet_ird.fr
Browse files

fonction MouseMotion: Utilise sprintf au lieu de strcat.

Améliore le rendu mais le format +07.4f ne marche pas.
Utiliser plusieurs uicontrol a la place. 
parent e1a877e5
No related branches found
No related tags found
No related merge requests found
...@@ -580,14 +580,16 @@ function tsgqc_GUI ...@@ -580,14 +580,16 @@ function tsgqc_GUI
if x > tsg.TIME(1) && x < tsg.TIME(end) if x > tsg.TIME(1) && x < tsg.TIME(end)
indCursor = find( tsg.TIME > x); indCursor = find( tsg.TIME > x);
% use sprintf with format instead strcat & num2str but flag
% - don't work with 0, eg %+07.4f
set( hInfoText, 'String',... set( hInfoText, 'String',...
strcat(... sprintf(['%s - Latitude = %07.4f - Longitude = %08.4f '...
datestr(tsg.TIME(indCursor(1)),'dd mmmm yyyy'),... ' - Salinity = %07.4f - Temperature = %07.4f'],...
' - Latitute = ', num2str(tsg.LATITUDE(indCursor(1))), ... datestr(tsg.TIME(indCursor(1)),'dd/mm/yyyy'),...
' - Longitude = ', num2str(tsg.LONGITUDE(indCursor(1))), ... tsg.LATITUDE(indCursor(1)), ...
' - Salinity = ', num2str(tsg.PSAL(indCursor(1))), ... tsg.LONGITUDE(indCursor(1)), ...
' - Temperature = ', num2str(tsg.TEMP_TSG(indCursor(1)))... tsg.PSAL(indCursor(1)), ...
tsg.TEMP_TSG(indCursor(1))...
)); ));
% Plot the position on the map if this one is active % Plot the position on the map if this one is active
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment