How to apply periodic boundary condition in a finite difference method?

3 visualizzazioni (ultimi 30 giorni)
I have a matrix 'q' with dimension 120*120 which will be used in finite difference method. But for the finite difference method to work, the i and j values in the for loop should start from 2 and end in 121 (in my case). q(j,1)=q(j,120) : Periodic boundary condition. So how to include the first and last column for computation in the FDM?

Risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by