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
2. What does the Action tool allow you to do in Microsoft PowerPoint? (20 points)
creativ13 [48]
B. Add actions

A. a presentation without a clear beginign middle and end

A. add action between slides
7 0
3 years ago
Read 2 more answers
Given half a chance other people at work will take advantage of you
Damm [24]

have self-control and if you have a problem dont be afraid to speak your mind, show other people you mean buisness, but be polite to aviod starting more problems

3 0
3 years ago
Calculate the maximal size of a file if we have:
ollegr [7]

Answer:

4 GB

Explanation:

<u>Determine the maximal size of a file </u>

100 direct block address

= 100 * 1024 = 102400

One single indirect block address

= 128 * 1024 = 131072

One double indirect block address

= 128 * 128 * 1024 = 16777216

one triple indirect block address

=  128 * 128 * 128 * 1024 = 2147483648

one quadruple indirect block addresses

=  128 * 128 * 128 * 128 * 1024 = 274877906944

maximal size of the file

= ∑ 102400 +  131072 + 16777216 + 2147483648 + 274877906944

= 4GB

7 0
3 years ago
the term elastic in ec2 refers to the fact that you can easily increase or decrease the number of servers you run to support an
Dvinal [7]

The phrase "elastic" refers to the ability of a user to construct, launch, and terminate server instances as needed while paying per second for active servers.

By giving users control over the physical location of instances, EC2 enables users to reduce latency and increase redundancy. the capacity to acquire resources as needed and to release resources as required. You want to carry out this task automatically in the cloud. Even if an instance becomes ill or based on criteria you specify, Amazon EC2 Auto Scaling will automatically adjust the number of instances in the group to maintain a fixed number of instances.

Learn more about server here-

brainly.com/question/14307521

#SPJ4

6 0
11 months ago
0111101101010110101110110001001011101001011101101010101010110101
rodikova [14]

Answer:

binary digits in computer system it belongs

4 0
3 years ago
Other questions:
  • When you compose a message, you want your audience to find the information it needs quickly and to understand what it finds. You
    11·1 answer
  • A process that allows software-based networked computers to run multiple operating systems and programs and share storage is cal
    5·1 answer
  • 2. Suppose you want to write a method that prints a heading on a new output page, along with a page number that is 1 in the firs
    15·1 answer
  • A blank is a copy of one or more files that is made in case the original become lost or damaged
    7·1 answer
  • Write a program in C++ or C that includes two different enumeration types and has a significant number of operations using the e
    15·1 answer
  • Write the definition of a function that takes as input the three numbers. The function returns true if the first number to the p
    12·1 answer
  • Write a program that asks the user to enter two integer numbers X and Y. The program halves each number between X and Y then pri
    15·1 answer
  • 100 POINTS!!!!!!
    7·2 answers
  • Explain the different type of shift register counter ​
    14·1 answer
  • Write a program that uses a structure to store the following data about a customer account: Name Address City, State, and ZIP Te
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!