Question
matlab

2) Plots the individual points with star marks b) Fisa cubie spline to the data use o marks c) Fits a 5th order polynomia
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The code for part 'a' is:

function value = First_Name(x, b) % First_Name is your first name

value = log(x) / log(b); % calculating log value

end

The sample and live script for part 'a' is:

MATLAB R2019b-academic use X HOME PLOTS APPS EDITOR la O PUBLISH VIEW ? Search Documentation Sign In New Open Save Run and Ad

The live script code for part 'b' is:

>> b = [1; 2; 3; 4; 5];

>> CalculatedValue = [First_Name(10, 1); First_Name(10, 2); First_Name(10, 3); First_Name(10, 4); First_Name(10, 5)];

>> table(b, CalculatedValue)

The sample of live script and output for part 'b' is:

Add a comment
Know the answer?
Add Answer to:
matlab 2) Plots the individual points with "star" marks b) Fisa cubie spline to the data...
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
  • matlab D [10 pts Consider following data points Groups a) Use linear interpolation method to fit...

    matlab D [10 pts Consider following data points Groups a) Use linear interpolation method to fit data. Use 'interp1 b) Fit data with a cubie spline. Use "spline e) Fit a 4h degree polynomial using "polyf Tools Help Make a figure for each of the interpolation methods. In each figure show data points using ocircle marks, a curve that eorresponds to the interpolation method

  • Using Matlab. I can't seem to get the fprintf part to display the values in 2...

    Using Matlab. I can't seem to get the fprintf part to display the values in 2 columns. Could someone help me with that Before calculators were readily available (about 1974), students used tables to determine the values of mathematical functions like sine, cosine, and log. Create such a table for sine, using the following steps: • Create a vector of angle values from 0 to 27 in increments of T/10. • Calculate the sine of each of the angles, and...

  • MATLAB Problem HW7P2 (20 points) (5 pts) Write a user-defined MATLAB function called HW7P2_fn for the...

    MATLAB Problem HW7P2 (20 points) (5 pts) Write a user-defined MATLAB function called HW7P2_fn for the following math function 3 o-0.47x The input to the function is x and the output is y. Write the function such that x can be an array (use element-by-element operations) (15 pts) Use the function in (a) the command window to calculate y(-2) and y(5) (b) a script file HW7P2.m to determine y(x) for 0.001 Sx S 10 with 1000 points. Hint: Use the...

  • Numerical method For matlab For the following equation 20 Marks fx)-1-(5 log1o x)-x2 a. Plot the...

    Numerical method For matlab For the following equation 20 Marks fx)-1-(5 log1o x)-x2 a. Plot the function graphically from 0 to 2 using fplot. b. Find out the average value of f(x) for x -0 to 8 and display it using fprintf. Show final result with 2 decimal digits. Hint: You have to use a for loop, mean0, log100 functions of Matlab. Vrite a function which returns determinant, transpose and square of a matrix as output. To I file for...

  • solve it by using matlab Question 2) (2.5 points) Examine the following trigonometric identity: sin'(x) =...

    solve it by using matlab Question 2) (2.5 points) Examine the following trigonometric identity: sin'(x) = (3 sin(a) – sin(3.c)) Verify that this identity is valid. To do so, define a variable x as x = 84 (in degrees!). Compute the left and right sides of the identity and assign them to variables p2left and p2right. Because x is in degrees, make sure you are using the correct trig function! Use the help function if you are unsure. Question 1)...

  • 1) a) Write MATLAB function that accepts a positive integer parameter n and returns a vector...

    1) a) Write MATLAB function that accepts a positive integer parameter n and returns a vector containing the values of the integral (A) for n= 1,2,3,..., n. The function must use the relation (B) and the value of y(1). Your function must preallocate the array that it returns. Use for loop when writing your code. b) Write MATLAB script that uses your function to calculate the values of the integral (A) using the recurrence relation (B), y(n) for n=1,2,... 19...

  • please i need the requiered MATLAB script to solve this. All calculations need to be done in matlab please Design Layout References Mailings Review View Share 1) (15 points) Calculate the followi...

    please i need the requiered MATLAB script to solve this. All calculations need to be done in matlab please Design Layout References Mailings Review View Share 1) (15 points) Calculate the following for the function f(x) = e-a-x a. Use calculus to determine the correct value of the derivative. b. Develop an M-file function to evaluate the centered finite-difference approximations, starting with x = 0.5 Thus, for the first evaluation, the x values for the centered difference approximation will be...

  • This is a matlab HW that I need the code for, if someone could help me figure this out it would b...

    This is a matlab HW that I need the code for, if someone could help me figure this out it would be appreciated. The value of t can be estimated from the following equation: in your script file, estimate the value of π for any number of terms. You must ask the user for the desired number of terms and calculate the absolute error/difference between your calculation and the built-in MATLAB value ofpi. Display your results with the following message...

  • (a) (4 points) Fill in the blanks in the following MATLAB function M file trap so...

    (a) (4 points) Fill in the blanks in the following MATLAB function M file trap so that it implements the composilu trapezidul rulo, using a soquence of w -1,2, 4, 8, 16,... trapezoids, to approximatel d . This M file uses the MATLAB built-in function trapz. If 401) and y=() f(!)..... fr. 1)). 3= ($1, then the execution of z = trapz(x, y) approximates using the composite trapezoidal rule (with trapezoids). (Note that the entries of are labeled starting at...

  • please solve then upload matlab code Thanks 1. The function f(z, y) (a-x)2 + b(y-12)2 is...

    please solve then upload matlab code Thanks 1. The function f(z, y) (a-x)2 + b(y-12)2 is called Rosenbrock's banana function. It is often used as a benchmarking test for optimization algorithms becatse it is easy to find the minimum by hand but often very difficult to find numerically. Throughout the problem, we will use the values a = 2 and b 10. You can plot this function using the following code: x3:0.1:3; y = -10:0.2:10; Cx,Ymeshgrid(x,y); Z(2-X).2 10* (Y-X. 2)....

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