Great video! I recreated this code as a function that allows the user to input the number of points they would like! Here's the code: Instead of: syms h f1 f2 f3 %Define offset points x = [ -h; 0; h]; f = [f1; f2; f3]; Replace with syms f [1 nPoints] syms h %Define offset points % the lower/upper coefficient of the offset point will be odd if central % difference. We can express this as nPoints = 2C - 1 , k = 1 , 2 , 3 ... % Solving for C f = f.'; C = (nPoints - 1)/2; x = (-C:C).*h; x = x.'; Thanks!!!!!!! This is useful for my linear advection calculation comparison!
u r rt luis..btw can u help me in implementing finite difference using symbolic toolbox ?? I have 2 pde in 2 dependent variables I apply finite diference in space & time I get finite difference equation now since my pde are non linear also ..I cannot solve it but simply A\B technique I have to use NEWTON RAPHSON METHOD FOR SYSTEM OF NON LINEAR EQAUTIONS Each node equation is non linear equation how do I differentiate it symbolically? I am at a loss in implementing NEWTON RAPHSON SYMBOLICALLY IN MATLAB FOR SYSTEM OF EQUATIONS FOR FINITE DIFFERENCE?????
I have 2 pde in 2 dependent variables I apply finite diference in space & time I get finite difference equation now since my pde are non linear also ..I cannot solve it but simply A\B technique I have to use NEWTON RAPHSON METHOD FOR SYSTEM OF NON LINEAR EQAUTIONS Each node equation is non linear equation..SO DIFFERENTIATE IT..MAKE A JACOBIAN how do I differentiate it symbolically? I am at a loss in implementing NEWTON RAPHSON SYMBOLICALLY IN MATLAB FOR SYSTEM OF EQUATIONS FOR FINITE DIFFERENCE????? Show less
Can you use the secant method and solve your problem numerically? The secant method is essentially a fully numerical version of the Newton-Raphson method. See Lecture 4b in this video series.
Sorry. I somehow missed your question. If are you willing to spend a little money, here is your answer... empossible.thinkific.com/courses/fdmhybridmodes
Strictly speaking, this is not programming finite difference in matlab. It's more like writing the analytical solution of FD, which can be done by hand, with matlab.
You are correct. This video merely shows how to derive the finite-difference approximations. It does not show you how to use those to perform numerical differentiation or to solve differential equations. That happens in later videos and lectures. It is also possible to do this on paper, however, a numerical approach is needed if you ever implement the finite-difference method on an unstructured or nonuniform grid.
Great video! I recreated this code as a function that allows the user to input the number of points they would like! Here's the code:
Instead of:
syms h f1 f2 f3
%Define offset points
x = [ -h; 0; h];
f = [f1; f2; f3];
Replace with
syms f [1 nPoints]
syms h
%Define offset points
% the lower/upper coefficient of the offset point will be odd if central
% difference. We can express this as nPoints = 2C - 1 , k = 1 , 2 , 3 ...
% Solving for C
f = f.';
C = (nPoints - 1)/2;
x = (-C:C).*h;
x = x.';
Thanks!!!!!!! This is useful for my linear advection calculation comparison!
The first lesson to learn when entering the world of finite differences
u r rt luis..btw can u help me in implementing finite difference using symbolic toolbox ??
I have 2 pde in 2 dependent variables
I apply finite diference in space & time
I get finite difference equation
now since my pde are non linear also ..I cannot solve it but simply A\B technique
I have to use NEWTON RAPHSON METHOD FOR SYSTEM OF NON LINEAR EQAUTIONS
Each node equation is non linear equation
how do I differentiate it symbolically?
I am at a loss in implementing NEWTON RAPHSON SYMBOLICALLY IN MATLAB FOR SYSTEM OF EQUATIONS FOR FINITE DIFFERENCE?????
Give the man a Beer !!! Thank you !
I'll take it! I like Russian Imperial Stouts, dark wheats, and plenty of others.
I have 2 pde in 2 dependent variables
I apply finite diference in space & time
I get finite difference equation
now since my pde are non linear also ..I cannot solve it but simply A\B technique
I have to use NEWTON RAPHSON METHOD FOR SYSTEM OF NON LINEAR EQAUTIONS
Each node equation is non linear equation..SO DIFFERENTIATE IT..MAKE A JACOBIAN
how do I differentiate it symbolically?
I am at a loss in implementing NEWTON RAPHSON SYMBOLICALLY IN MATLAB FOR SYSTEM OF EQUATIONS FOR FINITE DIFFERENCE?????
Show less
Can you use the secant method and solve your problem numerically? The secant method is essentially a fully numerical version of the Newton-Raphson method. See Lecture 4b in this video series.
I want to solve a waveguide problem by FDM metrix method can you please help me !
Sorry. I somehow missed your question. If are you willing to spend a little money, here is your answer...
empossible.thinkific.com/courses/fdmhybridmodes
Strictly speaking, this is not programming finite difference in matlab. It's more like writing the analytical solution of FD, which can be done by hand, with matlab.
You are correct. This video merely shows how to derive the finite-difference approximations. It does not show you how to use those to perform numerical differentiation or to solve differential equations. That happens in later videos and lectures.
It is also possible to do this on paper, however, a numerical approach is needed if you ever implement the finite-difference method on an unstructured or nonuniform grid.