Matlab coding for forward time scheme

In summary, the conversation discusses the use of generalized eikonal formalism and numerical methods such as lepfrog, forward time centered space, forward-time backward space, and forward time forward space to detect interference phenomena. Due to stability issues, an implicit technique is also being used. The speaker is facing difficulties in the coding part, as they must use MATLAB software but their supervisor has limited experience with it. They are seeking advice on how to approach the coding aspect of their project, which includes familiarizing themselves with MATLAB, breaking down the project into smaller tasks, and utilizing online resources for help.
  • #1
jaclyn28
1
0
I'm doing my project on generalized eikonal formalism to detect interference phenomena instead of using geometrical phenomena. Now, i have selected numerical method such as lepfrog, forward time centered space, forward-time backward space and forward time forward space to detect that optical phenomena. due to the stability problem, implicit technique has been used as well. Now, i face problem in the coding part. the coding must be done in MATLAB software but my supervisor didn't teach much because she also don't have much experience in that software. please help me to give some idea on this coding part.
 
Physics news on Phys.org
  • #2
I suggest that you begin by familiarizing yourself with MATLAB and its capabilities. There are many tutorials available online and in print which can help you learn the basics of the programming language and how to use it. Once you have a good understanding of the language, you can then focus on developing the code for your project. I recommend breaking down the project into small manageable tasks and then tackling each one at a time. As you become more comfortable with the coding, you can move onto more complex tasks. Additionally, if you need help with the coding, there are many MATLAB forums available online where you can post questions and get answers from experts.
 

1. What is a forward time scheme in Matlab coding?

A forward time scheme is a method for numerically solving differential equations in which the next time step is calculated based on the current time step. This is in contrast to a backward time scheme, where the next time step is calculated based on the previous time step. Forward time schemes are commonly used in Matlab coding for solving time-dependent problems.

2. How do I implement a forward time scheme in Matlab?

To implement a forward time scheme in Matlab, you will need to define the differential equation you want to solve and the initial conditions. Then, you can use a numerical solver such as ode45, which uses a fourth-order Runge-Kutta method, to calculate the solution at each time step. Alternatively, you can write your own code to calculate the solution using a forward time scheme.

3. What are the advantages of using a forward time scheme in Matlab coding?

One advantage of using a forward time scheme is that it is relatively easy to implement and can be used for a wide range of differential equations. Additionally, forward time schemes are often more stable than backward time schemes, meaning they are less likely to produce inaccurate or unstable solutions.

4. Can a forward time scheme be used for solving partial differential equations?

Yes, forward time schemes can be used for solving partial differential equations in Matlab. However, the accuracy and stability of the solution may depend on the specific equation and numerical method used. It is important to carefully choose the time step and numerical method to ensure an accurate and stable solution.

5. Are there any limitations to using a forward time scheme in Matlab coding?

One limitation of using a forward time scheme is that it can be computationally expensive, especially for problems with a large number of time steps. Additionally, forward time schemes may not be suitable for all types of differential equations, and in some cases, a backward time scheme or other numerical method may be more appropriate.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • Programming and Computer Science
Replies
1
Views
944
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
7K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
955
  • MATLAB, Maple, Mathematica, LaTeX
Replies
17
Views
2K
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
27
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
7K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
9K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
9K
Back
Top