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
During which phase of system development would you acquire any necessary hardware and software?
solmaris [256]

During the <u>design</u> phase of system development, you would acquire all the necessary hardware and software.

<h3>What is SDLC?</h3>

SDLC is an abbreviation for system development life cycle and it can be defined as a strategic methodology that defines the key steps, phases, or stages for the design, development and implementation of high quality systems.

In Computer technology, there are seven (7) phases involved in the development of a system and these include the following;

  • Planning
  • Analysis
  • Design
  • Development (coding)
  • Testing
  • Deployment
  • Maintenance

Also, phased implementation simply refers to an implementation methodology in which smaller portions of functionality of a system are typically implemented one at a time (one after the other).

In conclusion, we can infer and logically deduce that you would acquire all the necessary hardware and software during the <u>design</u> phase of system development.

Read more on phases here: brainly.com/question/7112675

#SPJ1

3 0
1 year ago
Which operating system function has a steeper learning curve and can potentially break the system without careful use of its ope
grandymaker [24]

Answer:

4. Command line interface (CLI)

Explanation:

An operating system is a system software pre-installed on a computing device to manage or control software application, computer hardware and user processes.

This ultimately implies that, an operating system acts as an interface or intermediary between the computer end user and the hardware portion of the computer system (computer hardware) in the processing and execution of instructions.

Some examples of an operating system on computers are QNX, Linux, OpenVMS, MacOS, Microsoft windows, IBM, Solaris, VM etc.

A Command line interface (CLI) refers to a text-based user interface that allow users to operate a software application or program, as well as manage and execute operating system functions by typing standard line of commands into the text-based user interface with a real-time response.

Basically, the CLI is solely text-based and as such requires a thorough knowledge and understanding of global commands, as well as administrative privileges in some cases.

<em>Hence, the operating system function which has a steeper learning curve (more difficult to learn) and can potentially break the system without careful use of its operations is the Command line interface (CLI). </em>

3 0
2 years ago
Write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs the smalle
almond37 [142]

Answer:

Check the explanation

Explanation:

10

5

3

21

2

-6

the output will be somthing like this:

2 21

You can then suppose that the list of integers will contain at least 2 values.

4 0
3 years ago
I can’t unblock brainly from my computer, I think a robot has the same IP address .
prisoha [69]
They won’t let it be on your computer, knowing it well give you answers
6 0
3 years ago
Read 2 more answers
/*
Lera25 [3.4K]

Answer:

The answer to this question can be given as:

Method:

public static void showTwos(int number)  //method definition.

{

method body.  

System.out.print(number + " = ");  //print number

while (number % 2 == 0)   //condition

{

System.out.print("2 * ");    //print message.

number = number / 2;

}

System.out.println(number);    //print value.

}

Explanation:

In the above method definition firstly, we declare the method showTwos() that name is already given in the question then we pass a variable number as a parameter in the method. In this first, we take input number from the user and pass into this method. In this method we use a while loop it is an entry control loop in this loop first we modules the number if it is equal to 0.Then we divide the number by 2 and in the last, we print the value.

4 0
2 years ago
Other questions:
  • How to jail break iphone 7 with <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7617023602">[email&#160
    11·2 answers
  • What is the automotive name for the large wires that allow more electrical current to flow ?
    12·1 answer
  • Lux Ladies, Inc., is a company that specializes in expensive and unusual gifts for all occasions. It keeps a large file of infor
    11·1 answer
  • Evolution of computers
    13·2 answers
  • ________________is a distribution of Linux Operating<br>system for desktop computers.<br>​
    15·1 answer
  • How can parents be health educators in family​
    13·1 answer
  • Composition means ________. a)that data fields should be declared private b)that a class extends another class c)that a variable
    6·1 answer
  • How did the use of ARPANET change computing?
    14·1 answer
  • 9. Lael wants to determine several totals and averages for active students. In cell Q8, enter a formula using the COUNTIF functi
    9·1 answer
  • Henry wants to create a presentation for his clients. He wants to upload the presentation file directly to the Internet. Which p
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!