Message Boards Message Boards

Need serious help with lists!

Posted 9 years ago

Here is my code:

(* Take inputs for ECEF *) x = Input["What is the x coordinate?"]; y = Input["What is the y coordinate?"]; z = Input["What is the z coordinate?"];

(* Put in Coordinate Form *) GeoPositionXYZ[{x, y, z}, "ITRF00"];

(* Convert to LLA *) GeoPosition[%]

(* Display Map *) GeoGraphics[GeoMarker[GeoPosition[%]],GeoRange -> "World", GeoProjection -> "Robinson"]

It lets me input coordinates for one point in ECEF, then converts it to latitude/longitude/height and shows it on a map.

I want to keep showing the 2d map... but I also want to show a 3d globe that locates the coordinates on the 3d cartesian plane also. I need to be able to put in more than one coordinate. It needs to keep asking for more x's, more y's, more z's... until I stop inputting them. Eventually it's going to be modified to pull them out of a text file, but for now these two changes need to be made. Any ideas/hints/help/guidance is appreciated. Thanks.

POSTED BY: Nathan Lundholm
11 Replies

I give up. Mathematica, please give me a refund. I'm dropping out of school because I have no future in this line of work. I don't have an IQ of 500000 so I'll never be able to learn Mathematica.

POSTED BY: Nathan Lundholm

Please don't stop helping me.

POSTED BY: Nathan Lundholm

Also, how do I read back all the contents of a list?

POSTED BY: Nathan Lundholm

Right now I need to learn how to manipulate the lists in the first place. How do I add new x value to xlist? Is it Append[xlist, x] ?

POSTED BY: Nathan Lundholm
Posted 9 years ago

Figuring out how programming works is a real hurtle.

Figuring out how Mathematica progamming works can be a hurtle on top of two other hurtles.

For your lists, what about something like this inside your While

{GeoGraphics[GeoMarker[GeoPosition[{x, y, z}]], GeoRange -> "Country"], 
 GeoGraphics[GeoMarker[GeoPosition[{x, y, z}]], GeoRange -> "World", GeoProjection -> "Robinson"]
}

but this is doing things with new parts of Mathematica that I've never even seen before.

POSTED BY: Bill Simpson

If I want 3 lists will xlist={} and ylist={} and zlist={} work?

POSTED BY: Nathan Lundholm

Sure.

POSTED BY: Marco Thiel

That might actually be helpful... if there was anyway for anyone other than a rocket scientist to understand how to create empty lists in the first place... I've read the entry for lists a trillion times and the only lists that seem possible to make are prepopulated by hardcoded data.

POSTED BY: Nathan Lundholm

Hi,

list={}

Cheers,

Marco

POSTED BY: Marco Thiel
Posted 9 years ago

Hint for the second part of your question: Look up While in the help system. Could that do something for you?

POSTED BY: Bill Simpson

That might actually be helpful... if there was anyway for anyone other than a rocket scientist to understand how to create empty lists in the first place... I've read the entry for lists a trillion times and the only lists that seem possible to make are prepopulated by hardcoded data.

POSTED BY: Nathan Lundholm
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract