answer.
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]
2 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]2 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
A(n) ______of the audio or video clip makes the content easily accessible to people with hearing disabilities.
defon

subtitles

hope that helped you

7 0
2 years ago
Read 2 more answers
A hidden backlog contains the projects that the IT department is not aware of because of low feasibility.
Finger [1]

Answer: True

Explanation:

Yes, the given statement is true that the due to the very low feasibility the IT (Information technology) department are not aware of the hidden backlog that basically contain projects.

The feasibility is the main factor in the IT department as it helps to study whole objective of the project and then also uncover all the strength and weakness of the project so that we can easily go through the details to make the project more efficient and reliable.

8 0
2 years ago
American company Software Unlimited is planning to expand its operations to the Bangor Republic where the group is the primary u
FinnZ [79.3K]

Answer:E. Employees will achieve close cooperation with others.

Explanation: Employees will close cooperation with others as a result of the expansion of the company to the Bangor Republic where the group is the primary unit of social organisation, When a company expands to new locations it boosts employment morale and corporation as they find it as a form of expansion and overall good of the employees and their employer, most of expand as a result of favourable economic climates.

7 0
2 years ago
(1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the arr
Mashutka [201]

Answer:

weights = []

total = 0

max = 0

for i in range(5):

   weight = float(input("Enter weight " + str(i+1) + ": "))

   weights.append(weight)

   total += weights[i]

   if weights[i] > max:

       max = weights[i]

average = total / 5

print("Your entered: " + str(weights))

print("Total weight: " + str(total))

print("Average weight: " + str(average))

print("Max weight: " + str(max))

Explanation:

Initialize the variables

Create a for loop that iterates 5 times

Get the values from the user

Put them inside the array

Calculate the total by adding each value to the total

Calculate the max value by comparing each value

When the loop is done, find the average - divide the total by 5

Print the results

6 0
2 years ago
What is the difference between paper size and page margins in Word?
sergij07 [2.7K]

Answer:

Paper size refers to the size of the paper you will be printing your document on, while page margins refer to the outside area of a page that can be made bigger or smaller to fit content.

Launch the Page Setup dialog box from the Page Setup group; in the Margins section, enter the page margin values and click OK.

All the statements are correct.

Right-click and add to dictionary

Type the words onto the first page of the document, and click on the Header button to repeat it on all of the other pages

pictures shapes and clipart

none of the above

Explanation:

7 0
2 years ago
Other questions:
  • Mary is writing an article about the animal kingdom. She wants to place image below the text. Which menu should Mary choose for
    15·2 answers
  • Write a sequence of statements that create a file named "greeting" and write a single line consisting of "Hello, World!" to that
    5·1 answer
  • Which word in brackets is most opposite to the word in capitals? PROSCRIBE (allow, stifle, promote, verify)​
    14·2 answers
  • ____ twisted pair is the least quality twisted pair wire that should be used in a data/voice application.
    9·1 answer
  • Which of the following methods could be considered a "best practice" in terms of informing respondents how their answers to an o
    7·1 answer
  • A 'array palindrome' is an array which, when its elements are reversed, remains the same (i.e., the elements of the array are sa
    5·1 answer
  • Write a program that plays a reverse guessing game with the user. The user thinks of a number between 1 and 10, and the computer
    5·1 answer
  • Which statements describe best practices for aligning text? check all that apply
    8·2 answers
  • Choose the reasons why Windows Server operating systems are a popular choice for a network because they _____. Select all that a
    12·1 answer
  • Describe how a cell’s content and format attributes are related.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!