1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
OLEGan [10]
3 years ago
5

The geographic coordinate system is used to represent any location on Earth as a combination of latitude and longitude values. T

hese values are angles that can be written in the decimal degrees (DD) form or the degree, minutes, seconds (DMS) form just like time. For example, 24.5° is equivalent to 24°30'00''. Write a MATLAB script that will prompt the user for an angle in DD form and will print in sentence format the same angle in DMS form. The script should error-check for invalid user input. The angle conversion is to be done by calling a separate function in the script.
Computers and Technology
1 answer:
Pachacha [2.7K]3 years ago
8 0

Answer:

Here is the script:  

function dd = functionDMS(dd)  

prompt= 'Enter angle in DD form ';

dd = input(prompt)

while (~checknum(dd))

if ~checknum(dd)

error('Enter valid input ');

end

dd = input(prompt)

end  

degrees = int(dd)

minutes = int(dd - degrees)

seconds = ( dd - degrees - minutes / 60 ) * 3600  

print degrees

print minutes

print seconds

print dd

Explanation:

The script prompts the user to enter an angle in decimal degree (DD) form. Next it stores that input in dd. The while loop condition checks that input is in valid form. If the input is not valid then it displays the message: Enter valid input. If the input is valid then the program converts the input dd into degrees, minutes and seconds form. In order to compute degrees the whole number part of input value dd is used. In order to compute the minutes, the value of degrees is subtracted from value of dd. The other way is to multiply remaining decimal by 60 and then use whole number part of the answer as minutes. In order to compute seconds subtract dd , degrees and minutes values and divide the answer by 60 and multiply the entire result with 3600. At the end the values of degrees minutes and seconds are printed. In MATLAB there is also a function used to convert decimal degrees to degrees minutes and seconds representation. This function is degrees2dms.

Another method to convert dd into dms is:

data = "Enter value of dd"

dd = input(data)

degrees = fix(dd);

minutes = dd - degrees;

seconds = (dd-degrees-minutes/60) *3600;

You might be interested in
Which of the following identifies the patterns used for each data series in a chart?
Lady_Fox [76]
The answer is A)Legend.
7 0
3 years ago
__________ BI apps use real-time or near real-time data in order to support line managers who need to monitor performance of his
ruslelena [56]

Answer: Operational BI(Business Intelligence)

Explanation:Operational business intelligence is the tool that works on the organizational performance through evaluation and testing by analyzing the business process and data.It is rapid responding tool for the changing business pattern and demands.

Strategical, tactical and traditional business intelligence tool don't provide the evaluation of the business performance in the accordance with business trends rather having strategical approach, planned approach and traditional approach respectively.

Thus, the correct option is option(b).

8 0
3 years ago
What's a good drawing tablet?
DENIUS [597]

Answer:

Wacom Intuos S

Explanation:

If you're looking for a good tablet that isn't too expensive the Wacom Intuos S is a great starter, I personally use it and really enjoy it. It doesn't have a graphic screen. If you're looking for one with a graphic screen get the Wacom Cintiq 22, It's expensive but great quality. Most tablets with a graphic screen are this expensive though. But if you REALLY want one with a graphic screen that isn't TOO expensive I recommend the HUION Kamvas pro 12.

Hope I could help!

4 0
3 years ago
Read 2 more answers
Process is useful for a quick turnaround in game development?
aleksley [76]
Rapid prototyping as it allows the production of a functional program in a short time
7 0
3 years ago
Read 2 more answers
What is the most common form of renewable energy used to generate electricity
sertanlavr [38]

i think that it’s either sunlight or solar energy

6 0
3 years ago
Other questions:
  • Assume that ip has been declared to be a pointer to int and that result has been declared to be an array of 100 elements . Assum
    7·1 answer
  • A vertical curve means that any change in the Aggregate Price Level will have what result?
    15·1 answer
  • Which of the following is not an example of technological progress? A: new scientific knowledge that has practical applications
    12·2 answers
  • list the version of Windows you are using XP, Windows7, Windows8 and then explain the steps you will use to find the programs
    6·1 answer
  • A single-user database system automatically ensures ____ of the database, because only one transaction is executed at a time.
    13·1 answer
  • Grace is performing a penetration test against a client's network and would like to use a tool to assist in automatically execut
    13·2 answers
  • Green computing involves reducing electricity consumed and environmental waste generated when using a computer. which of the fol
    5·1 answer
  • These operating systems were referred to as command-based.
    10·2 answers
  • Vivek wants to save the data about his grocery store in a single table. Which among the following type of databases is used in t
    7·1 answer
  • Information to develop a project network is collected from the.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!