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
Which advertising medium has the widest reach on a global front?
lesya [120]

Answer: B

The internet would allow businesses to easily expand globally with the help of social media and the ever expanding resources being poured onto the internet, reaching customers anywhere in the world.

8 0
2 years ago
Lin is booting up his computer, and during the boot process, the computer powers down. After several unsuccessful attempts to bo
mel-nik [20]

Answer:

The RAM Modules.

Explanation:

If the power supply is working properly, the next thing that could cause an auto-shutdown could be the RAM.

Sometimes static electricity,  a faulty slot, or even a faulty memory module  could be causing the RAM to fail. And as the OS needs to read from the RAM in order to boot, at the moment the processor can't find the RAM information, it shuts down the system.

Changing the RAM modules to a different slot, switching slots, or cleaning the memory module pins with a regular eraser can help solve the problem. If not, then Lin might need to buy a new module, or keep going forward with the diagnostic process.

3 0
1 year ago
"So far this month you have achieved $100.00 in sales, which is 50% of your total monthly goal. With only 5 more workdays this m
Rus_ich [418]

Answer:

$20 per day for next 5 working days.

Explanation:

if 50% is $100.00 another $100 need to achieve in 5 days.

100/5=20

3 0
1 year ago
Read 2 more answers
There are no breakpoints in the "Access Customer Account" subpage however there is an error. What will happen if you choose to s
blsea [12.9K]

Answer:

Move to the breakpoint at "Get Customer Details" stage.

Explanation:

This question is incomplete, we need a diagram and four options to resolve this questions, I attached the diagram and the options.

- The process will work all stages in the "Access Customer Account" page until the error is thrown and then focus would move to the breakpoint at "Get Customer Details" stage.

- The process will work all stages in the "Access Customer Account" page until the error is thrown and then focus would move to the "Recover1" stage.

- The process will work all stages in the "Access Customer Account" page until the error is thrown and then focus would move to the stage containing the error on the "Access Customer Account" page.

- The process will work all stages in the "Access Customer Account" page until the error is thrown and then focus would move to the "Exception1" stage.

In this case, we are going to run an extra from subpage testing in <u>Process studio</u>. Process studio is a tool where we can test these processes.

The process always it's going to work all stages in the "Access Customer Account" we're going to receive an interruption when the error is activated, moving the focus to the Get Customer Details stage.

There is an error in the stage Access Customer Account, if we run the processes with the Go button, the focus should move into the Recover1 stage, and should show the error.

But in this particular example, we must use the STEP OUT BUTTON, What means this?

The process it's going be executed, but won't show any error or message, because we have used the STEP OUT BUTTON.

If we use the STEP OUT BUTTON, the process should end but in this case, we have a breakpoint in Get Customer Details stage, for that the focus and the process will end in Get Customer Details stage and not at the end or at the Recover1 stage.

8 0
1 year ago
This program finds the sum and average of three numbers. What are the proper codes for Lines a and b?
Gennadij [26K]

Answer:

The Proper codes in Line a and Line b is given below

average=Sum/3  

print (" Average is = ", average)

Explanation:

In the given question it calculated the sum but the program does not calculate the average of the 3 numbers.The average of the 3 number is calculated by using average=Sum/3   statement so we add this code in Line a then After that print the value of average by using the print function so we add this code in Line b.

4 0
1 year ago
Read 2 more answers
Other questions:
  • john wants to view sarah's assignment files on his computer. but he cannot open them because of version problems. which upgrade
    14·2 answers
  • What are the pros and cons of using unique closing reserved words on compound statements?
    15·1 answer
  • Which feature of Badoo helped members make their profile more prominent?
    14·1 answer
  • Assume that name has been declared suitably for storing names (like "Misha", "Emily" and "Sofia") Write some code that reads a v
    10·1 answer
  • Which of the following best defines the term cross-platform application?(A) A program used to coordinate data sharing among mult
    14·2 answers
  • Why is the following statement true - ideally, your information is abbreviated
    10·2 answers
  • Represent the logic of a program that allows the user to enter a value for one edge of a cube. The program calculates the surfac
    10·1 answer
  • Create two classes. The first, named Sale, holds data for a sales transaction. Its private data members include the day of the m
    8·1 answer
  • Define a method printAll() for class PetData that prints output as follows with inputs "Fluffy", 5, and 4444. Hint: Make use of
    13·1 answer
  • What is the value of the variable result after these lines of code are executed?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!