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
aleksley [76]
3 years ago
12

Piecewise functions are sometimes useful when the relationship between a dependent and an independent variable cannot be adequat

ely represented by a single equation. For example, the velocity of a rocket might be described by where v is the rocket velocity in m/s and t is the time in seconds. Write a program to compute v as a function of t. Generate a plot of v versus t for t = −5 s to 70 s using 100 points for t. Requirement:
Computers and Technology
1 answer:
Andru [333]3 years ago
8 0

Answer:

//Set a piecewise function v(t).

function v = vpiece(t)

//Set the condition first for t.

if ((0<=t)and(t<=8))  //Set if condition

// first equation of velocity.

   v = 10*t^2 - 5*t;

//Set the condition second for t.

elseif((8<=t)and(t<=16))  //Set elseif condition

//second equation of velocity.

v = 624 - 5*t;

//set the condition third for t.

elseif((16<=t)and (t<=26))  //Set elseif condition  

//third equation of velocity.

v = 36*t + 12*(t - 16)^2;

//Set the fourth condition for t.

elseif t>26

//fourth equation of velocity.

v = 2136*exp(-0.1*(t-26));

//Last condition.

else

//fifth equation of velocity.

v = 0;

//End of the function v.

end

//set a variable and initialize it to 0.

a=0;

//Starting the loop.

for j = -5: 0.5 : 70

//Increment the value of a by 1.

a = a + 1;

t(a) = j;

v(a) = vpiece(t(a));

//End of for loop.

end

//Plot the graph between t and v.

plot(t,v)

//Write the label for the x-axis.

xlabel('t')

//Write the label for the y-axis.

ylabel('velocity')

//Write the title of the plot.

title('Plot of velocity vs t')

Explanation:

Firstly, we set the piecewise method.

Then we set the first condition, after that we apply the condition of velocity.

Then we set the second condition, after that we apply the condition of velocity.

Then we set the third condition, after that we apply the condition of velocity.

Then we set the fourth condition, after that we apply the condition of velocity.

Then we set the last or fifth condition, after that we apply the condition of velocity.

Then we set the variable "a" to 0.

Then start the loop and increase the value by 1.

And after all, we write the title of the plot.

You might be interested in
Carrie is creating a personal balance sheet. The heading includes the period of time that the balance sheet
frez [133]

Answer:

the answer is A

Explanation:

carries balance sheet ( 2013)

4 0
3 years ago
What is the real meaning of hack and crack?
vovangra [49]
Hack means hack computer and crack means I guess your behind
7 0
3 years ago
Dani wants to create a web page to document her travel adventures. Which coding language should she use? HTML Java Python Text
FromTheMoon [43]

Answer:

<h2>I would recommend Python Programming language</h2>

Explanation:

The major reason i recommend python is that It has a ton of resources, and community support, such that it is practically impossible to get stuck while carrying out a project

Python is easy,and lets you build more functions with fewer lines of code.

More so, provides a stepping stone to learning other code and it is a very  flexible language

3 0
3 years ago
Please answer fast as soon as possible.
zhenek [66]

Answer:

1. Scripts area is the main working area in Scratch.

2. Sensing blocks are color-coded light blue.

3. Adware is a malware which pops up a window, informing the user that the system is infected and asks for a fee to clean it.

4. Amaya is a WYSIWYG.

8 0
2 years ago
2. How do upgrading and retraining help you cope with change?
Luden [163]
<h2>Upgrading and retraining are mandatory to move along with the world.</h2>

Explanation:

Let us understand the term deeply,

Upgrading - Updating yourself with the latest

Retraining - learning new skills

Let me give you a real-life example which is nothing but "mobiles". If you are not updated then:

  • you will sit with mobile to make calls and
  • do money transactions only by stepping into the bank,
  • connect with people only through calls or directly visiting them,
  • distance break up the relationship,
  • booking tickets in classical way, etc.

These could be done in one touch if you have latest mobile with necessary applications.

In a similar way, we need to get retrained to get to learn new skills, technologies so that we can do our job the best, to be on track, be productive, convert your valuable knowledge in terms of money, to be peaceful in day today transactions, etc.

7 0
3 years ago
Other questions:
  • When does state law require drivers to use their headlights (6)
    11·2 answers
  • epic poem - long narrative poem about heroic deeds about pharrell williams of the happy song please help i need the right answer
    11·1 answer
  • What was one complication caused by the tsunami that struck japan in 2011?
    15·1 answer
  • (3 points) Write a program to process two large chunks of data (e.g., a large 3D array and an array of self-defined structures w
    11·2 answers
  • Tweaking existing technology in a new way is usually called _____. leveraged creativity state-of-the-art breakthrough applicatio
    5·1 answer
  • What factor(s) should be considered when determining whether a business is too far based on the query and the user location? Sel
    10·1 answer
  • If you copy and paste from someone else's document (such as a website, a friend's paper, an instructor's solutions manual, etc.)
    15·1 answer
  • Please help it’s timed
    5·1 answer
  • What is the difference between Brainly.com and Brainly.in? Ive been wondering because im not signed in under Brainly.in.
    6·2 answers
  • Add comma(s) where needed, if needed.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!