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
The inventory tracking system shows that 12 laptop were on hand before a customer brings two laptops to the register for purchas
Bingel [31]

Answer:

Inventory errors can cause mismatches between the real numbers of the company, to avoid this you must use software that allows you to avoid these errors.

Explanation:

There is <u>software that line</u> (in the cloud), which is not necessary to install directly on a laptop or server.

Software examples for optimal inventory management:

1. ERP software in the cloud (it is an enterprise resource planner), it is flexible and low cost.

2. my MANAGEMENT

3. Crol

4. bind ERP (for SMEs)

5. Cloudadmin

6. Multi-commerce (license required).

6 0
2 years ago
The machine should not be oiled until the
kicyunya [14]
<span>The machine should not be oiled until the recommended time between oilings is up.</span>
6 0
3 years ago
The objective fuction of linear progrmming should be
Minchanka [31]
The real-valued function whose value is to be either minimized or maximized subject to the constraints defined on the given LPP over the set of feasible solutions. The objective function of a LPP is a linear function of the form z = ax + by.
4 0
2 years ago
Hello 10 points if my Chromebook is on 26 percent how much time do I have left theoretically
velikii [3]
About 15 minutes.......
7 0
2 years ago
Read 2 more answers
A program written in a(n) procedural language consists of sequences of statements that manipulate data items. __________________
Alenkasestr [34]

Answer:

true.

Explanation:

According to my research on information technology, I can say that based on the information provided within the question the statement is completely true. Procedural programming is a widely used paradigm that basically gives the program a set of routines or specifications, and the program mixes and matches them as they continuously repeat the process. It is used in many areas, including video game development.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
3 years ago
Other questions:
  • Plz tell me a storage device that should be used for this and why
    11·1 answer
  • *Please* read before answering.
    14·1 answer
  • Jeremy Aronoff has purchased a new laptop. He wants to customize the operating system to meet his
    7·1 answer
  • Problem 5. (Greatest Common Divisor) Write a program gcd.py that accepts p (int) and q (int) as command-line arguments, and writ
    13·1 answer
  • In a graphical user interface, which is a small symbol on the screen whose location and shape changes as a user moves a pointing
    10·1 answer
  • The architecture in which the database resides on a back-end machine and users access data through their workstations is
    5·2 answers
  • A Cisco Catalyst switch has been added to support the use of multiple VLANs as part of an enterprise network. The network techni
    5·1 answer
  • The complete process for learning through repetition is to read, write, say, rest and revisit the information. Please select the
    12·2 answers
  • Write a C# program named ProjectedRaises that includes a named constant representing next year’s anticipated 4 percent raise for
    15·1 answer
  • Please help me with this coding problem :)
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!