Please find required MATLAB code along with necessary details in comments:
clear all; % clear workspace
close all; % close all figures
clc % clear command window
%% define anonymus function
y=@(x) (2*x^4) -(7*x^3) -(44*x^2) + 92.5*x +262.5;
%% evalaute function value at x=-3, 0, 3
y_n3=y(-3)
y_0=y(0)
y_3=y(3)
%% plot the function
h1=fplot(y,[-4,5.5]);
grid on;
hold on
h2=fplot(0); % plot x-axis
%% locate all zeros in the function plot using initial
estimates
% obtained from the graphs
% x = fzero(fun,x0) tries to find a point x where fun(x) = 0.
This solution
% is where fun(x) changes sign—fzero cannot find a root of a
function such as x^2.
x01=fzero(y,-4)
x02=fzero(y,-2)
x03=fzero(y,4)
x04=fzero(y,5)
% plot the zeros for ease of reference
h3=plot([x01;x02;x03;x04],[0;0;0;0],'r*');
%% Locate the minimum of function value from the estmates
obtained from the
% graph
% x = fminsearch(fun,x0) starts at the point x0 and attempts to
find a
% local minimum x of the function described in fun.
[xmin1,ymin1] = fminsearch(y,-3)
[xmin2,ymin2] = fminsearch(y,5)
% plot the minimum for ease of reference
h4=plot([xmin1;xmin2],[ymin1;ymin2],'bs');
legend([h1,h2,h3,h4],{'y(x)','x-axis','Zeros','Local Minima'});
-------------------------------------- SCREENSHOT OF CODE
-------------------------------------------------------------------------------- SAMPLE OUTPUT
popcorn while using less paper to manufacture them. il l suript can help manufacturers of popcorn...
Please help me out by giving me detailed answers with formulas. So I can understand fully Thank you very much A study is conducted to examine the influence of ‘screen time’ on student performance on Statistics exams. A class of 12 students is observed over a period of time, with the independent variable being the average amount of time per day each student spends on TV/internet, and the dependent variable being their subsequent Statistics exam score, in %. The data...