Community Profile

photo

Fahad


Last seen: Today Active since 2021

Statistics

  • Thankful Level 1
  • First Review

View badges

Content Feed

View by

Question


I have the following code to calculate d/dx sin(0.5)) using first derivative principle and compare it with the real value. Why does err starts increasing again?
clc n=30; x=0.5; h=zeros(n,1); y=zeros(n,1); err=zeros(n,1); h(1)=1; for i=1:n-1 y(i)=(sin(x+h(i))-sin(x))/h(i) ...

environ un mois ago | 1 answer | 0

1

answer