Thanks Tim and Mike! I think I will stick with SPICE then for the circuit simulation and analysis portions.<br><br>I am currently running student versions of MATLAB with Simulink and Simscape. Simulink+Simscape offers a nice size library of components to build models of circuits and such so it looked to me like it could be promising, but now I'm not so sure what the benefits of using MATLAB's Simscape system simulation version SPICE or, from what I read, I'm thinking it's two different tasks to tackle.<br>
<br><div class="gmail_quote">On Wed, Apr 1, 2009 at 4:01 PM, Tim Slagle <span dir="ltr"><<a href="mailto:tim@slagle.org">tim@slagle.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
MATLAB is great for image processing or matrix math because it has the built-in syntax and libraries to make the source code very compact - just like writing the equations down. It is interpreted so you pay a price in execution speed for simple loops that don't use the vector libraries. Recent MATLAB versions have added a just-in-time compiler to make loops and such run faster, and that has boosted the speed a lot for people who write code C or FORTRAN style instead of using the vectorization. But considering the cost of the package, unless you will take advantage of the libraries you'd probably better off using C/C++ if you are already comfortable with them.<br>
<br>
MATLAB also has support for sparse matrices, although I haven't used that feature. If you look at a circuit as a vector of nodes and the interconnections between nodes as a matrix, most of the matrix elements would be zero (no connection). So sparse matrices can save memory in big circuits, and I think SPICE uses sparse matrix solvers internally. But as far as I know there are no built-in or add-on packages for circuit simulation in MATLAB, at least through the MathWorks.<br>
<br>
There is also a sister package Simulink that is typically used for control theory and system simulation, and it is better for time-sequential computations. You can model your system by drawing block diagrams and then write code for each block's functions. And, there is a SimElectronics add-on for it. But Simulink is even more expensive than MATLAB. (They are independent products although I'm sure you can go back and forth).<br>
<font color="#888888">--Tim<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
----- Original Message ----<br>
> From: Mike O'Dell <<a href="mailto:mo@ccr.org">mo@ccr.org</a>><br>
> To: <a href="mailto:dorkbotdc-blabber@dorkbot.org">dorkbotdc-blabber@dorkbot.org</a><br>
> Cc: HacDC Public Discussion <<a href="mailto:blabber@hacdc.org">blabber@hacdc.org</a>><br>
> Sent: Wednesday, April 1, 2009 2:38:34 PM<br>
> Subject: Re: [dorkbotdc-blabber] MATLAB Circuit Simulation and Analysis<br>
><br>
> that sure sounds more like SPICE than Matlab<br>
><br>
> based on my (admittedly thin) experience, Matlab excels at<br>
> jobs where closed-form analytic solutions exist, ideally in<br>
> matrix form. Signal processing and control theory come to<br>
> mind as natural fits. While one can formulate DC circuits<br>
> in such forms, it's a lot more natural to do it in SPICE<br>
> since the input form is a transliteration of the schematic.<br>
><br>
> i'd be interested to find out that similar facilities exist<br>
> for Matlab, but in my experience, Matlab is for system<br>
> dynamics (control loops) and SPICE is for circuit dynamics.<br>
><br>
> -mo<br>
> ........................................................................<br>
> .......dorkbot dc: people doing strange things with electricity.........<br>
> ................... <a href="http://dorkbot.org/dorkbotdc" target="_blank">http://dorkbot.org/dorkbotdc</a> .......................<br>
> ................... SUBSCRIPTION MANAGEMENT .......................<br>
> ........ <a href="http://dorkbot.org/mailman/listinfo/dorkbotdc-blabber" target="_blank">http://dorkbot.org/mailman/listinfo/dorkbotdc-blabber</a> ........<br>
> ........................................................................<br>
<br>
........................................................................<br>
.......dorkbot dc: people doing strange things with electricity.........<br>
................... <a href="http://dorkbot.org/dorkbotdc" target="_blank">http://dorkbot.org/dorkbotdc</a> .......................<br>
................... SUBSCRIPTION MANAGEMENT .......................<br>
........ <a href="http://dorkbot.org/mailman/listinfo/dorkbotdc-blabber" target="_blank">http://dorkbot.org/mailman/listinfo/dorkbotdc-blabber</a> ........<br>
........................................................................<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Andrew Q Righter<br><a href="mailto:q@theqlabs.com">q@theqlabs.com</a><br><br>Founder: The Q Labs<br>CoFounder: HacDC<br><br>