Please answer question on
MATLAB showing work and the script. Thank you.
matlab code for A bit

MATLAB FOR B BIT
function y=calcMean(A)
total=0;
for i=1:length(A);
total=total+A(i);
end
mean=total/length(A);
fprintf('mean is %d',mean);
end
programme
X=randperm(10,5);
disp(X);
calcMean(X);
OUTPUT:

Please answer question on MATLAB showing work and the script. Thank you. Create a function M-ile...
Create function files that will use a “for” loop to perform the following tasks for a random input array “x”: (a) Count how many elements are greater than an arbitrary integer. Display these values as well as the count using “fprintf”. (b) Calculate the arithmetic mean of array “x” without using the built-in functions “sum”, “mean”, etc. and display the result using “fprintf”.
DO THIS IN MATLAB PLEASE
DO THIS IN MATLAB
Create a script file that performs the following calculations. Your script will use the functions you create. Label all graphs appropriately. For this project, do not have your homemade functions fprintf anything, instead have all your fprintf commands within your script. Attach your published script file along with .m files for your functions. Exercise 1. A fundamental iterative method for finding the roots of equations of one-variable is known as Newton's...
Create a MATLAB function to perform Lagrange Interpolation. Your function will be used as illustrated below: >> ya = Lagrange(x, y, a) where "x" is a vector of ? independent data values, "y" is a vector of ? dependent function values corresponding to "x", "a" is an arbitrary value of "x" for which you want to know the Westimate of "y", and "ya" is the estimate of the function at x=a. Print an error message and exit the function if...
MATLAB Programming Question Create an M-file (script) that prompts the user to enter a value of x and then calculates the value of sin (x). This is my script: x=input('enter value of x in radians'); y=sin(x); And I get the error message, Warning: Function sin has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict. How would I fix this?
Using MATLAB. Create a script file that calls a user-defined function within a for/end loop to symbolically compute the derivative of ln(x) on the interval from -5 to 5, containing 100 data points. Your script file should output a plot of the derivative of ln(x) (taken from your function) vs x. Use a line with circular markers for the plot and include a grid and appropriate labels. The user-defined function should 1. Receive a single x value as input. 2....
specify Output, please.
6. Create a MATLAB script to integrate the given function using the numerical scheme called Trapezoid's Rule. a. f(x)- xe* +3x1+2x-1 and find for with h 0.1, 0.01 and 0.001 Input: (copy and paste the MATLAB or Scilab command in the following box)
Convince yourself that the Maclaurin Series for cos(x) is:
A. Write a function script called cos_series
that takes that takes as its inputs, x and N and has output given
by the sum in the N-term Maclaurin Series approximation for Cos(x).
Hint: try a “for loop” and set “format long” in
your code. You may use the MATLAB built-in function factorial()
B. Check your code by finding the 2-terms,
3-terms, 4-terms, 5-terms and 6-terms Maclaurin Series
approximations every 30 degrees...
Use MATLAB to solve this problem. Thank you.
Upload the assignment to CANVAS, it should include two things: the PDF and the zipped folder. Late assignments are not accepted. For the questions below, do not create the arrays or matrices by hand. Instead, use built-in MATLAB functions and shorthand notations. Otherwise, no points will be given. 1) Create a function called my product that computes the multiplication of the numbers in any vector using a while loop. The function should...
5. Create a MATLAB script to find the first and second derivative of given function using Forward, Backward, central and Taylor numerical schemes. Test your code using the following functions: f(x)-xe*+3x2 +2x -1 and find f (3) and f' (3) for with h 0.1, 0.01 and 0.001 b. Approximate y'(1) and y"(1) using the following table f(x) 0.992 0.8 0.9 0.999 1.0 1.001 1.008 Input: (copy and paste the MATLAB or Scilab script in the following box)
5. Create a...
Using mat lab to do it
Create a single script file named yourname_While.m to answer the following problems. The file must be in cell mode to distinguish each problem. Make sure your script is nicely commented for each problem. Consider the following matrix of values: x =[345, 23, 17, 34, 85, 334, 111, 1067] Use a for loop and if statement to determine how many values greater than 30? Use fprintf to display the result. Repeat Problem 1., but use...