Results 1 to 3 of 3

Thread: Plotting locations on Matlab 3D sphere

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Plotting locations on Matlab 3D sphere

    Well, I've a 250x3 matrix containing some geographic coordinates locations, where the first column represents the latitude (-90 to 90), the second one longitude (-180 to 180), and the third one is just the radius (for now, I'm not considering altitude, so it's the same value for all).

    I've tried creating a sphere, but I can't see how to plot the points on it. I've also just tried by plotting using sph2cart (for using this I made all latitudes and longitudes positive and running between 0 and 360) and then plot3. This option gives me a "sphere of points" with the correct radius, but wrong locations. Is possible to do this on Matlab?

    The code looks like this:

    superdat; % This is the 250x3 matrix of coordinates
    [datacbo datacba datacz]=sph2cart(superdat(:,1)*(pi/180),superdat(:,2)*(pi/180),superdat(:,3));

    Extra: a plot of the coordinates in 2D-Equirectangular projection

    Click image for larger version. 

Name:	Ili_Thar_-180_180.jpg 
Views:	187 
Size:	48.3 KB 
ID:	58800
    Last edited by Tharsoum; 11-01-2013 at 08:28 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts