Question

I need this MATLAB question answered ASAP!!! thanks in advance!

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

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

function out = repeatedMean()
total = input('Input the total number of observations: ');
sum = 0;
for m = 1:total
statement1 = sprintf('enter your %d observation',m);
num = input(statement1);
sum =sum+ num;
mean = (sum / m);
statement2 = sprintf('mean till %d th observation is %f',m,mean);
disp(statement2);
end
end

0 MATLAB R2018a HOME - Search Documentation x Log In APPS EË E PLOTS Find Files BB Compare - Print EDITOR PUBLISH VEW Insert

Note: Brother according to HomeworkLib's policy we are only allowed to answer first part if there are many. So, I request you to post other part as separate posts.

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
I need this MATLAB question answered ASAP!!! thanks in advance! 10 Write a program which prompts...
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
  • question 2 in C programming please PE-05b-01 (Six-sider) write a counter-controlled program that prompts the user...

    question 2 in C programming please PE-05b-01 (Six-sider) write a counter-controlled program that prompts the user to enter the number of times n to roll a six-sided die. The program should print to the screen the iteration of the loop and result for each roll 1 ) How many times would you like to roll? 3 roll 6 6 5 1 2) PE 05b 02 (Flash Cards) Write a counter-controlled program that creates addition problems for an elementary kid to...

  • i need Matlab code asap Write a program that evaluates the function f(x) = tan’x +...

    i need Matlab code asap Write a program that evaluates the function f(x) = tan’x + x - 2 between -27 and 27 in steps of 1/10 and plots the results. Create a function handle for your function, and use function feval to evaluate your function at the specified points. 2. Write a program that locates the zeros of the function f(x) = cos éx -0.25 between 0 and 27. Use the function fzero to actually locate the zeros of...

  • I need to Write a test program that prompts the user to enter 10 double values...

    I need to Write a test program that prompts the user to enter 10 double values into an array, calls a method to calculate the average of the numbers, and displays the average. Next, write a method that returns the lowest value in the array and display the lowest number. The program should then prompt the user to enter 10 integer values into an array, calculates the average, and displays the average. The program should have two overloaded methods to...

  • I need help with this python programming exercise, please! thanks in advance Create a Python script...

    I need help with this python programming exercise, please! thanks in advance Create a Python script file called hw4.py. Add your name at the top as a comment, along with the class name and date. Both exercises should be in this file, with a comment before each of them to mark it. Ex. 1. Write a program that inputs an integer number from the user, then prints a letter "O" in ASCII art using a width of 5 and the...

  • /* I'm trying to write this program here but my problem is getting the program to...

    /* I'm trying to write this program here but my problem is getting the program to save the user input to "int data" but cannot because it is part of the struct. What do I have to do in order to get this to work? (Language is C++) Write a program that prompts the user to enter numbers on the screen and keep adding those numbers to a linked list. The program stops when user enters -999. Hint: Use a...

  • hello please i need help ASAP QUICKLY Write down a complete C++ program that will use...

    hello please i need help ASAP QUICKLY Write down a complete C++ program that will use the following functions related with a triangle; a) a function that will let the user to input the and to return the sizes of the three sides, let say a, b, c. b) a function that will calculate and return the area of the triangle; Area=(1/2)(a+b+c) c) a function that will print the sizes of the triangle and its area on the screen. Then...

  • Java Write a Simple Program This question is about following the directions below. Failure to do...

    Java Write a Simple Program This question is about following the directions below. Failure to do so, results in lost credit. Write the definition of a method that takes in an integer number, and returns true if the number is prime, otherwise, returns false. A prime number is only divisible by itself and 1. Do not write the code for main here. The code must follow these steps in the order shown: 1. Name the method isPrime, and make it...

  • Need this program ASAP C++ language 1b. Write the implementation file timeClock.cpp for the class TimeClock....

    Need this program ASAP C++ language 1b. Write the implementation file timeClock.cpp for the class TimeClock. Com pile the file, and save it in the Chap 13 folder of your Student Data Files. 1c. Write a C++ program named weeklyPay.cpp to test your class Timeclock Your program should ask the user how many hours the user worked each day of the week. An object should be created for each day of the week with the number of hours for each...

  • Any one has answered the question Write a computer program (preferably in MatLAB) to solve the...

    Any one has answered the question Write a computer program (preferably in MatLAB) to solve the following bar problem using finite element method. As shown in the figure below, the bar is fixed at the left and right ends. It is subjected to two forces as shown in the figure. The input to the code should be Material properties (Modulus of elasticity). 2. I. Length of the bar, L 3. Magnitudes and locations of Fi and F2 4. Number of...

  • 1. (30 Points) Write a MATLAB program that displays "The multiplication of 10 multiplied by integers...

    1. (30 Points) Write a MATLAB program that displays "The multiplication of 10 multiplied by integers of 1 through 15. Display your result back to the user with 2 decimal places (yes, 2 decimal places). You must implement your code using a for loop. The result should have the following format: The multiplication of 10*1 =10.00 The multiplication of 10*2 =20.00 The multiplication of 10'3=30.00 The multiplication of 10*15=150.00 2. (35 Points) Write MATLAB code to prompt a user for...

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