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
2. A body is thrown vertically<br>100 m/s Theme taken to retum​
kondaur [170]

Answer:dead man lol roffle

Explanation:Not a gamer moment

6 0
3 years ago
Over the last decade, the overall energy consumption of cloud data centers worldwide has remained relatively the same. Why is th
s2008m [1.1K]

Over the last decade, the overall energy consumption of cloud data centers worldwide has remained relatively the same because the technology supporting cloud data centers has become much more energy efficient.

<h3>Why has the energy consumption of cloud data centers remained the same?</h3>

The reason is that servers are said to be six times as heavy as data in terms of energy consumption is one that is seen to be due to improved hardware efficiency.

In regards to cloud, the machines are said to be  running by giving web services and other machines  room to consumes some level or amount of energy that can be used for working.

Hence, Over the last decade, the overall energy consumption of cloud data centers worldwide has remained relatively the same because the technology supporting cloud data centers has become much more energy efficient.

Learn more about cloud data centers from

brainly.com/question/13440433

#SPJ1

See full question below

Over the last decade, the overall energy consumption of cloud data centers worldwide has remained relatively the same. Why is this so? The technology supporting cloud data centers has become much more energy efficient. There is significantly less customer demand for cloud computing than a decade ago. Cloud providers have placed limits on the amount of data stored at each center. Cloud data centers operate with less computing power than they did in the past.

8 0
2 years ago
LargeCo is planning a new promotion in Alabama (AL) and wants to know about the largest purchases made by customers in that stat
pychu [463]

Answer:

Check the explanation

Explanation:

Assuming Cust_code is unique for every customer.

Query :

SELECT * FROM CUSTOMER WHERE CUST_STATE= "AL" GROUP BY CUST_CODE HAVING LARGEST INVOICE = MAX(LARGEST INVOICE) OR (LARGEST INVOICE =0 and INV_DATE IS NULL);

5 0
3 years ago
What is a man-in-the-middle attack​
VMariaS [17]

Answer: An attack where the attackers will interrupt a data transfer happening between parties and in which they will pretend to be the legitimate parties.

Explanation: For example think about two people writing letters to each other back and forth. However you, the attacker can intercept the letters and effectively change the message/contents of the letter going to the other person. This is probably not the best explanation, but simply put a man-in-the-middle attack is when an attacker interupts a transfer and pretends to be the legitimate source.

4 0
2 years ago
Read 2 more answers
Can someone help me write an algorithm and a flow chart pls for question 3
emmainna [20.7K]

for i in range(20, 51, 2):

      print(i)

6 0
3 years ago
Other questions:
  • What microprocessor was the first to be processable<br> ?
    14·1 answer
  • Which scientific law states that if a light source radiates isotropically, the light intensity falls off the further you get fro
    5·1 answer
  • ____ refers to data, applications, and even resources stored on computers accessed over the Internet. Answer
    5·1 answer
  • Suppose that we can improve the floating point instruction performance of machine by a factor of 15 (the same floating point ins
    13·1 answer
  • Which tool can you use in spreadsheet software to display only specific data values?
    9·1 answer
  • The instructions for a computer program are sometimes referred to as . computer programmers focus on computer programs, but they
    5·2 answers
  • You can minimize the Ribbon with a command contained on the _____.
    7·1 answer
  • 120
    14·1 answer
  • Which of the following is a particularly useful feature of Microsoft PowerPoint and
    8·2 answers
  • The ___ function can be entered by clicking the cell where you want to add the funtion such as cell J6. Then click the arrow nex
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!