Question

In this problem, * prompt the user to enter the rate at which x is moving....

In this problem,

* prompt the user to enter the rate at which x is moving.

* Create a vector of time values from 0 to 15.

* Use the following equations to calculate the height over time and the volume over time.

x = xRate * time

yRate = 2x * xRate

y = yRate * time

* Display your results in a table format where time is the first column, x is the second column, y is the third column, and the rate of y is the fourth column, Add a header

line to your table.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

SOLUTION-

Below is the code :)

Code-

clc%clears screen
clear all%clears history
close all%closes all files

xRate=input('Enter the rate of x moving ');
time=[0:15];
x=xRate.*time;
yRate=2*x*xRate;
y=yRate.*time;
data=[time',x',y',yRate'];

VarName={'Time','x','y','Rate_Of_y'};
T=table(data(:,1),data(:,2),data(:,3),data(:,4),'VariableNames',VarName);
disp(T)

OUTPUT-

Enter the rate of x moving 2 Time Rate_of_Y X Y 0 1 2 0 8 16 2 3 G 32 40 5 6 7 E 56 10 12 14 16 18 20 22 0 8 32 72 125 200 29

IF YOU HAVE ANY DOUBT PLEASE COMMENT DOWN BELOW I WILL SOLVE IT FOR YOU:)
----------------PLEASE RATE THE ANSWER-----------THANK YOU!!!!!!!!----------

Add a comment
Know the answer?
Add Answer to:
In this problem, * prompt the user to enter the rate at which x is moving....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Help with this please Write an 8086 pasm program which will: Prompt the user to enter...

    Help with this please Write an 8086 pasm program which will: Prompt the user to enter an base-16 (hexadecimal) number from the keyboard. Store the number in the bx register 2) With an appropriate label, print the number in bx as a 16-bit binary value value value value. is Y or 'y' repeat from step 1). 3) With a second appropriate label, print the number in bx as an 8-digit base-4 4) With a third appropriate label, print the number...

  • Y F G Prompt and Store. 5. Prompt the user with "Enter your weight in pounds:...

    Y F G Prompt and Store. 5. Prompt the user with "Enter your weight in pounds: "message and store in the weight variable. 6. Initialize an int variable named heightIn Inches to feet OſHeight times 12 plus Inches OfHeight. 7. Initialize a double variable named BMI to weight * 703.0 heightIrinches El VB 8. Initialize a double variable named ratio to height In Inches? 703.0 9. Initialize a double variable named lower Normal to 18.5 times ratio. 10. Initialize a...

  • PYTHON CODING Create a program that prompts the user twice. The first prompt should ask for...

    PYTHON CODING Create a program that prompts the user twice. The first prompt should ask for the user's most challenging course at Wilmington University. The second prompt should ask for the user's second most challenging course. The red boxes indicate the input from the user. Your program should respond with two copies of an enthusiastic comment about both courses. Be sure to include the input provided by the user to display the message. There are many ways to display a...

  • extra credit 1 Write a program that will display the following menu and prompt the user...

    extra credit 1 Write a program that will display the following menu and prompt the user for a selection: A) Add two numbers B) Subtract two numbers C) Multiply two numbers D) Divide two numbers X) Exit program The program should: display a hello message before presenting the menu accept both lower-case and upper-case selections for each of the menu choices display an error message if an invalid selection was entered (e.g. user enters E) prompt user for two numbers...

  • Prompt the user for two numbers, call them "x" and "y". "x" must be less than...

    Prompt the user for two numbers, call them "x" and "y". "x" must be less than "y" or reject the entry and stop the program. Otherwise, add up all of the numbers between "x" and "y" and display the result. For example: Enter x: 10 Enter y, larger than x: 20 Total + 10 = 10 Total + 11 = 21 Total + 12 = 33 Total + 13 = 46 Total + 14 = 60 Total + 15 =...

  • USE C++ Problem 3: Prompt the user to enter a whole number of points to be...

    USE C++ Problem 3: Prompt the user to enter a whole number of points to be used in the approximation and robustly confirm that the number of points is positive (remember always ask user to re-enter before any calculations are performed). Then calculate and output the approximation for pi. Run your program at least twice with the entered number of points varying by at least a thousand. Examine your results and add a comment to the end of your source...

  • A drop test is performed on a particle free-falling through air. The theoretical y-coordinate of a...

    A drop test is performed on a particle free-falling through air. The theoretical y-coordinate of a particle dropped from an initial height is ? = ?? − 0.5??2 where, y = height above the ground yi = initial height above the ground g = gravity (386.4 in/s2) t = time after particle release. Your task is to create a program that prompt user to input initial height above the ground (yi). Then call a function (that you create) to calculate...

  • On Matlab: Use both X=A\b and X=inv(A)∗b to find x,y,z. Use tic toc to time each...

    On Matlab: Use both X=A\b and X=inv(A)∗b to find x,y,z. Use tic toc to time each method. Then create a general solver to solve any linear system of n equations and n unknowns of the form AX = b. Allow the user to input the n×n matrix A and n×1 column vector b. Use X = A\b to solve the system in your script and display the solution to the user. Try your solver with A = randi(50, 10), b...

  • Write a program that prompt the user to enter 3 integers: x,y and z. Your program...

    Write a program that prompt the user to enter 3 integers: x,y and z. Your program should output the answer to the user based on the divisibility of x and y by z as follows: Input If both x and y are divisible by z Result X and y are both divisible by 2. X is divisible by z. Y is divisible by z. Both X and Y are not divisible by If x is only divisible by z If...

  • Prompt the user to enter two character strings. The program will then create a new string...

    Prompt the user to enter two character strings. The program will then create a new string which has the string that appears second, alphabetically, appended to the end of the string that shows up first alphabetically. Use a dash (-') to separate the two strings. You must implement the function string appendStrings(string, string), where the return value is the combined string. Display the newly created string. Your program must be able to handle both uppercase and lowercase characters. You are...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT