i need to plot this function and determine the exact valuse of the derrivative at x=1

F(x)= 2x^3-3x+4 for the interval [-2,2]

2 件のコメント

Amit
Amit 2015 年 2 月 13 日
what is the question? Are you asking how to use plot function?
adriana resendez
adriana resendez 2015 年 2 月 13 日
yes

サインインしてコメントする。

 採用された回答

Eduardo Márquez
Eduardo Márquez 2015 年 2 月 13 日
編集済み: Eduardo Márquez 2015 年 2 月 13 日
Check help symbolic, if blue letter show it's oknd run:
% help symbolic
clear all; clc; close all;
syms fx x % Declare syms functions f(x) and x
fx = 2*(x^3) - 3*x + 4; % Funtion f(x)
Dfx = diff(fx,x); % f'(x)
xx=-2:.1:2;
subv = subs(fx,x,1); % Evalue f(x), x=1;
dfx1 = double(subv) % Back to double the answer
ez1=ezplot(fx,xx);
hold on
ez2=plot(1,dfx1,'ro'); % Show the point

3 件のコメント

adriana resendez
adriana resendez 2015 年 2 月 13 日
let me check it out thank you
Eduardo Márquez
Eduardo Márquez 2015 年 2 月 13 日
編集済み: Eduardo Márquez 2015 年 2 月 13 日
Check and modific the line
subv = subs(fx,x,1); % Evalue f(x), x=1;
by
subv = subs(Dfx,x,1); % Evalue f'(x), x=1;
Sorry
Final code is:
% help symbolic
clear all; clc; close all;
syms fx x
fx = 2*(x^3) - 3*x + 4;
Dfx = diff(fx,x);
xx=-2:.1:2;
subv = subs(fx,x,1);
dfx1 = double(subv)
ez1=ezplot(fx,xx);
hold on
ez2=ezplot(Dfx,xx);
set(ez2,'color',[1 0 0])
ez3=plot(1,dfx1,'ro');
adriana resendez
adriana resendez 2015 年 2 月 13 日
mkay

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by