LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Old May 12th 04, 06:14 AM
Joel Kolstad
 
Posts: n/a
Default

Arun S V wrote:
I am starting out on my class project which requires me to
write a 2D FDTD code.I am thinking of doing it in Matlab or C.Matlab
would offer good user friendliness but I have heard that Matlab being an
interpreted language is quite slow when it comes to loops.


We (myself and other classmates) did an entire numerical electromagnetics
class in Matlab. It's true that Matlab 'for' loops are slow... usually the
execution time of the programs was completely dominated by actually 'filling
up' the matrix (or cells) rather than, say, inverting the matrix, updating
cells, etc. Even so, for a 200x200 FDTD program on any contemporary PC
(1GHz), Matlab is plenty fast and I'd argue the ease of
plotting/manipulating the results more than outsweighs the generally
ignoranble speed penalty.

Heck, I did a FDTD program in C back in 1994 on some PA-RISC HPUX
workstation, and I'm _sure_ Matlab is a lot faster on a modern PC than C was
back then, and back then it was certainly fast enough!

BTW, look into parallelizing your code... sometimes it's a lot more trouble
than it's worth, but often it's very easy to get Matlab to fill in the
results of an entire row or an entire matrix in a single statement if you
code it correctly.

---Joel Kolstad


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 RadioBanter.
The comments are property of their posters.
 

About Us

"It's about Radio"

 

Copyright © 2017