close all; clear all; clc; %Skewed right-sided difference %(d^y/dx^2)=(af(x)+bf(x+dx)+cf(x+2dx)+df(x+3dx)+ef(x+4dx)+gf(x+5dx))/(dx^2) a=3.7500; b=-12.8333; c= 17.8333; d=-13.0000; e= 5.0833; x=pi*2; g=-0.8333; Dx=linspace(pi/40,pi/400000,20) analytical_function=exp(x)*cos(x) for i=1:length(Dx) dx=Dx(i) analytical_derivative=-2*exp(x)*sin(x)…
Naveen A
updated on 10 Apr 2020
Project Details
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Read more Projects by Naveen A (2)
Solving the steady and unsteady 2D heat conduction problem
clear all; close all clc; %initial conditions L=1; B=1; nx=10; ny=10; x=linspace(0,1,nx); y=linspace(0,1,ny); dx=L/(nx-1); dy=B/(ny-1); % steady state jacobi method T=ones(nx,ny); %boundary condtions T(:,1)=400; T(1,:)=600; T(end,:)=900; T(:,end)=800; Told=T; tol=1e-4; err=899; k=2*(((dx^2)+(dy^2))/((dx^2)*(dy^2))); method=[1…
15 Apr 2020 09:05 PM IST
Taylor table method and Derivation of the following 4th order approximations of the second-order derivative 1 Central difference 2 Skewed right-sided difference 3 Skewed left-sided difference
close all; clear all; clc; %Skewed right-sided difference %(d^y/dx^2)=(af(x)+bf(x+dx)+cf(x+2dx)+df(x+3dx)+ef(x+4dx)+gf(x+5dx))/(dx^2) a=3.7500; b=-12.8333; c= 17.8333; d=-13.0000; e= 5.0833; x=pi*2; g=-0.8333; Dx=linspace(pi/40,pi/400000,20) analytical_function=exp(x)*cos(x) for i=1:length(Dx) dx=Dx(i) analytical_derivative=-2*exp(x)*sin(x)…
10 Apr 2020 12:33 AM IST