• Remix
  • Share
  • New Entry

  • Ze Chen

  • /
  • derivative of exponential functions

on 30 Nov 2023
  • 12
  • 21
  • 0
  • 0
  • 639
drawframe(1);
Write your drawframe function below
function drawframe(f)
syms x g(x) dgx(x)
a = linspace(1,exp(1),44);
a = [a,exp(1).*ones(1,4)];
g(x)=a(f)^x;
dgx(x)=diff(g,x);
hg = fplot(g,LineWidth=2);
hold on
hgx = fplot(dgx,LineWidth=2);
text(1.5,g(1.5),'g ','FontSize',20,'FontWeight','bold','FontAngle','italic',...
'HorizontalAlignment','right','VerticalAlignment','bottom',...
'Color',hg.Color);
text(1.5,dgx(1.5),'g'' ','FontSize',20,'FontWeight','bold','FontAngle','italic',...
'HorizontalAlignment','left','VerticalAlignment','top',...
'Color',hgx.Color);
text(-4,9,sprintf('g(x) = %.3f^{x}',a(f)),'FontSize',20,'FontWeight','bold','FontAngle','italic');
hold off
xlim([-5,10]);
ylim([0,10]);
set(gca,'DataAspectRatio', [1.5,1,1]);
end
Animation
Remix Tree