MATLAB ODE programing and misc question

  • MATLAB
  • Thread starter jgoff14
  • Start date
  • Tags
    Matlab Ode
In summary, the Parallel Computing Toolbox may offer limited GPU support, but it is possible to run code on your GTX 295s using the Jacket tool.
  • #1
jgoff14
16
0
First, I looked for a MATLAB forum here but didn't see one so if there is and I missed it let me know for future posts I have a few more questions. Second, this isn't ode related but plays a small part in the next, longer question. This is two parts: I have an i7 980x w/12GB of RAM 2 gtx 295s and Windows 7 x64 ultimate. Now I have student version r2009a and its only 32bit but they have multi-threading enabled and I can enable 12 threads as needed tho it seems 90% of the functions only use 1. Question being, is there a way to allocate more ram like I would threads? Memory shows only 2046MB contiguous and 3072 total. I had some larger matrices and wanted more space. ( I'm not looking to optimize code. Its fine, I just have use for 100k+square matrix(s)). I ran bench and I can't manage to get above the top spot even overclocked to 3.8ghz, all my times are faster except for the 3D image. It says its a linux 64bit system with a garbage setup so is there a (non student) 64bit version of MATLAB that I can buy (cost doesn't matter)? If so is there a windows based version? I have no use for linux. Second question being I saw on their website that the parallel computing toolbox offers CUDA support and wanted to take advantage but also saw where it said its helpful for multiple users on the same computer. So is it actually capable of GPU based processing? Could I get the toolbox and somehow run it so ALL calculations are performed on my quad sli gtx 295s or will it not work that way? I saw it was released with a later version but is offered with r2009a will it be compatible? Now back to the third part: The actual ODE question being, that I don't have any formal training in MATLAB beyond a calculus level and was having a little trouble setting up and ODE and executing it. I have played with ODE45 and kinda got it working but I still don't know the real way its working and how to create the ODE I want and have it execute. I don't know when to use other solvers except when 45 doesn't work but that's not a problem for now. I know that nobody wants to type up a long step by step guide and I don't blame you. The demos are so specific and I haven't seen any that have instructions on setting up the problem. Can someone show me what steps with a small explanation of how and what order to input data? It would be greatly appreciated. I was trying simple first order ODEs (like y'=cos^2(y)*ln(t) (I didn't type it like that)) to try and get a feel for what it was asking but not so good ;)
 
Physics news on Phys.org
  • #2
jgoff14 said:
Second question being I saw on their website that the parallel computing toolbox offers CUDA support and wanted to take advantage but also saw where it said its helpful for multiple users on the same computer. So is it actually capable of GPU based processing? Could I get the toolbox and somehow run it so ALL calculations are performed on my quad sli gtx 295s or will it not work that way? I saw it was released with a later version but is offered with r2009a will it be compatible?

The GPU support offered in the Parallel Computing Toolbox is mostly slideware since it is so extremely limited. MathWorks is attempting to copy Jacket by AccelerEyes, which is much better IMO. I use Jacket for neuronal modeling and do a lot of ODE type work. I highly recommend it. You'll want to try their GFOR function for parallel GPU FOR loops too. Yes, with Jacket, you'll be able to run your code on your GTX 295 (which is actually two GPUs in one)!

Also, Jacket works with MATLAB versions back to 2007, while PCT requires R2010b or later.
 
  • #3
Great information thanks! And I have two 295s so 4 GPUs to run it on... BWAHAHAHAHAHA lol
 

FAQ: MATLAB ODE programing and misc question

What is MATLAB ODE programming?

MATLAB ODE programming is a method for solving ordinary differential equations (ODEs) using the software program MATLAB. It allows scientists and engineers to model and simulate dynamic systems in various fields such as physics, chemistry, and biology.

What is the difference between ODE and PDE in MATLAB?

ODE stands for ordinary differential equations, which involve a single independent variable and its derivatives. PDE stands for partial differential equations, which involve multiple independent variables and their derivatives. In MATLAB, ODEs are solved using the ode45 function while PDEs are solved using the pdepe function.

How do I define initial conditions for my ODE in MATLAB?

To define initial conditions for an ODE in MATLAB, you can use the initial value problem (IVP) syntax. This involves specifying the initial values for the dependent variables at the initial time point. For example, if your ODE is y'(t) = t + y(t) and the initial condition is y(0) = 1, you would use the syntax [t,y] = ode45(@(t,y) t+y, [0,10], 1).

What is the difference between a stiff and non-stiff ODE in MATLAB?

A stiff ODE is one in which the solution changes rapidly in a short time interval. Non-stiff ODEs do not have this rapid change. In MATLAB, stiff ODEs require a more specialized solver, such as ode15s, while non-stiff ODEs can be solved using the more general ode45 solver.

Can I use MATLAB ODE programming for time-dependent problems?

Yes, MATLAB ODE programming can be used for time-dependent problems. The time variable can be included in the ODE function and the appropriate solver can be used to solve the problem over a specified time interval. Additionally, the time variable can also be used to plot the solution as a function of time.

Similar threads

Replies
3
Views
4K
Replies
1
Views
3K
Replies
4
Views
1K
Replies
10
Views
3K
Replies
5
Views
1K
Replies
1
Views
3K
Back
Top