Write a program that creates two vectors from x-one

Assignment Help Basic Computer Science
Reference no: EM13306502

A vector is given by x = [-3.5 -5 6.2 11 0 8.1 -9 0 3 -1 3 2.5]. Using conditional statements and loops, write a program that creates two vectors from x-one (call it P) that contains the positive elements of x, and a second (call it N) that contains the negative elements of x. In both P and N, the elements are in the same order as in x.

Reference no: EM13306502

Questions Cloud

Write script that enables user to enter eigher a fahrenheit : Use these functions to write a script that enables the user to enter eigher a Fahrenheit or a Celsius temperature and displays the Celsius or Fahrenheit equivalent.
Determine the rise in temperature of the rock : A rock of mass 0.210 kg falls from rest from a height of 20.8 m into a pail containing 0.429 kg of water. determine the rise in temperature of the rock
Find out the transfer function : proper rational system alone,with initial conditions on its input and output Input is a step signal with arbitrary value. Calculate and Plot all the above using MATLAB writing a code.
Compute the coefficient of volume expansion of the liquid : A flask is filled with 1.58 L (L = liter) of a liquid at 100 °C. When the liquid is cooled to 13.3 °C, What is the coefficient of volume expansion of the liquid
Write a program that creates two vectors from x-one : write a program that creates two vectors from x-one (call it P) that contains the positive elements of x, and a second (call it N) that contains the negative elements of x. In both P and N, the elements are in the same order as in x.
Determne the angular velocity at the instint theta : When theta=0 degrees , the assembly is held at rest, and the torsional spring is untwisted. If the assembly is released and falls downward, determne the angular velocity at the instint theta=90.
Find the change in the period of the heated pendulum : A simple pendulum consists of a ball connected to one end of a thin brass wire. find the change in the period of the heated pendulum
What must average speed of the car be during the last min : During the first 18 minutes of a 1 hour trip, a car has an average speed of 11 m/s. What must the average speed of the car be during the last 42 minutes of the trip to be if the car is to have an average of 21 m/s for the entire trip
Determine the angular acceleration of this turntablr : When the power is turned off on a turntable spinning at 67.0 rpm, you find that it takes 13.0 revolutions for it to stop while slowing down at a uniform rate. What is the angular acceleration (in rad/s^2), of this turntable

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  What purposes do cpus, memory and i-o devices

What purposes do CPUs, memory and I-O devices individually serve in a computer system

  Browser immediately checks data is correct. true or false

When a user enters data into a form then submits the form (typically, by clicking the Submit button), the browser immediately checks that the data is correct. True or False

  What windows server 2008 capability

The IT Department wants to install Windows Server 2008 Standard Edition on 14 new servers in its primary location. The servers have arrived, are unpacked, and have been tested.

  Grown into a national chain with hundreds of locations

Habibi's has now grown into a national chain with hundreds of locations. Each location has one Windows Server 2008 and many Windows Vista desktop computers.

  Can the capability also be used to install windows 7

What Windows Server 2008 capability enables them to do the mass installation quickly and efficiently? What general steps are involved in setting up this capability? Can the capability also be used to install Windows 7 on the 24 new client workstat..

  What is a uml diagram?

What is a UML diagram? What does it include? Why is it used? What would the UML diagram look like for our lab assignment? This is for computer programming

  Action of violation of principle of least common mechanism

Discuss how this technique might prevent legitimate users from accessing the system. Why is this action a violation of the principle of least common mechanism?

  The args designate the range

The args designate the range [lo, hi]. If lo > hi, then that designates the empty range (no numbers), in which case outputA returns without outputting any numbers. Otherwise, outputA outputs all the numbers in the range that are interesting.

  How many times will the job be interrupted

how many times will the job be interrupted and on which queue will it finish its execution?

  What is data integrity and in what way it is implemented

What is data integrity and in what way it is implemented in DBMS MS Access

  What are some ways that company''s can use to get the word

Security awareness programs are their so employees cannot make ignorance an excuse. What are some ways that company's can use to get the word out, and to make sure their employees cannot make that excuse?

  Designing a game system

Suppose that you are designing a game system that responds to players' pressing buttons and toggling joysticks. The prototype system is failing to react in time to these input events.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd