jump to navigation

Using toggle button in MATLAB GUI December 13, 2010

Posted by viboon in : Matlab , add a comment

This guideline will enable you to activate or deactivate your code according to the toggle button associated with while loop.

1) Open the Matlab GUI and place a toggle button on the panel.

2) Under the toggle button function, add

1
2
3
while get(hObject,'Value')
%add your statements here
end

Tags: , , ,

Related posts:

Parallel computing in Matlab January 22, 2010

Posted by viboon in : Matlab , add a comment

To use the parallel computing mode, you have to have the Parallel Computing Toolbox installed in your computer. Of course, it is not free and you have to pay for it if it does not come along with your Matlab package.

The parallel computing mode plays a very significant role to reduce the computing time by applying “parfor” loop instead of conventional “for” loop. The general concepts are pretty much the same, but there are some limitations and constrains that you have to consider.


(more…)


Tags: , , ,

Related posts:

Writing C functions in Matlab August 17, 2009

Posted by viboon in : C, Matlab , add a comment

I face a long computing time problem when I work on Matlab to compute the large and complicated matrices with many loops inside. To reduce the calculating time particularly the loops, the external function written in C language is an effective method to be applied in the MEX-file format. By implementing C function, the computing time can be faster significantly.

Good how-to sources:
- MathWorks: Calling C and Fortran Programs from MATLAB Command Line
- Writing C Functions in MATLAB (MEX-Files)


Tags: , , , ,

Related posts: