Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Start with this:lab_2_start.m Download lab_2_start.m and complete the unfinished lines. This pdf describes how to read data from a url:web-read.pdf Download web-read.pdf The url we will read data from...

1 answer below »

Start with this:lab_2_start.mDownload lab_2_start.m

and complete the unfinished lines.

This pdf describes how to read data from a url:web-read.pdfDownload web-read.pdf

The url we will read data from is :

https://celestrak.com/NORAD/elements/tle-new.txt(Links to an external site.)

Write a program that uses an input function to read an index number from the user, and prints the data for the selected satellite in the format used for assignment 1.

The program will read data into a variable namedsat_list, which will then be a vector of strings. Every 3 lines represents one satellite. You can read access a line of data as shown in the pdf:

sat_list(i)is line i from the data.

Satellite 1 will have it's name, TLE line 1 and TLE line 2 in

sat_list(1)

sat_list(2)

sat_list(3)

Satellite 2 will have it's name, TLE line 1 and TLE line 2 in

sat_list(4)

sat_list(5)

sat_list(6)

So if the number the user enters is saved in variablen, you need to compute the three index numbers fromn.

Store the three lines in string variables namedname, line_1andline_2, just like in assignment 1, but instead of using string literals, use thesat_list:

name = sat_list(1);

will put the name of satellite 1 into the name variable.

Here is an example program to illustrate the input function and using an index on a vector:indexing_1.mDownload indexing_1.m

Answered Same Day Oct 11, 2021

Solution

Nishchay answered on Oct 11 2021
115 Votes
% Programming Assignment 2
% This is an outline for the program. The goal of the program is to read in
% data for a collection of satellites, ask the user for a number, and print
% the data for the selected satellite. Number 1 will mean the 1st satellite
% in the liat, number 2 the 2nd satellite, etc. Because there are 3 lines
% of data for each satellite, we need to compute from the number entered by
% the user what line the specified satallites data begins on. Example: if
% the user asks for satellite 3, we need to compute the line number as 7.
% The name of satellite 3 will be on line 7, and the TLE o
ital parameters
% will be on lines 8...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here