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

  Design a nine-step counter to count

Design a nine-step counter to count in the following sequence using D flip-flops (TTL 7474): 0011, 0101, 1001, 1000, 1011, 1010, 0110, 0100, 0111, 0011, include in the design a means for resetting the counter to 0011.

  Design a program that generates the sum of numbers

Design a program that generates the sum of numbers.

  Design an algorithm that prompts the user to enter a number

Design an algorithm that prompts the user to enter a number in the range of 1 through 100 and validates the input.

  The head office of kkae

The head office of KKAE is located in Australia/Sing/India. Documents and reports must be displayed/printed in English. Grammar and spelling in all the documents and output reports follow the English version. For example, some of the foreign salutati..

  Explain effective site navigation from internet

Students will research the best practices for site navigation and locate the example of effective site navigation from Internet.

  What security concerns might arise over mobile access

What security concerns might arise over mobile access to private corporate information

  Discussing your midterm thoughts and reflections

Discussing your midterm thoughts and reflections about the course - what you have learned in the classroom when you have your own class or how do you imagine it being used, if you have a class, what do you plan on changing?

  The contenders are tortoise and hare

The contenders are Tortoise and Hare, and they begin race as investors at "tile 1" of 70 tiles The finish line is at 70 the tile. With each tick of the clock

  What happens when you assign

What happens when you assign 340,282,343,598.33 to a Single variable? Assuming that the variable in question is named sngNumber and you execute the statement MessageBox.Show

  Determining minimum size of control bus

Determine the minimum size of the control bus?

  Write an excel nested if statement use the value

Write an excel nested if statement that will Use the value in cell A1 to determine which 2 cell values in column c that it falls between and enter the lower amount.

  Write a program to print duplicates in a string and count

1. write a program to print duplicates in a string and their count.

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