Matlab multitasking without using Parallel Computing Toolbox?

5 vues (au cours des 30 derniers jours)
David
David le 19 Déc 2014
Modifié(e) : per isakson le 20 Déc 2014
Hello.
I am a novice in programming in general, but I am using a arduino Due which is using a SAM3X8E 32bit mcu. SAM3 has both DMAC(Direct Memory Access Controller) and PDCs(Peripheral DMA Controller) which allows me for example to setup the ADC to continuously convert and store the results in a array without the CPU doing any of it. So I am free to preform other tasks at the same time.
A PC is far more powerful but is there any way to write a script to do many(or two) things at the same time as akin to DMA?
Maybe continuously reading a serial port for values to plot or process at the same time, using a ping-pong buffer.
Regards

Réponses (1)

per isakson
per isakson le 20 Déc 2014
Modifié(e) : per isakson le 20 Déc 2014
Before the release of the Parallel Computing Toolbox there where some independent "parallel toolboxes". Examples:
  2 commentaires
David
David le 20 Déc 2014
I have a student license, it will take a couple of years before I can afford a private license with all those toolboxes I want. There are many toolboxes I can't access from mathworks, but I don't know if I am also restricted from other toolboxes such as these two. It will take me a while to read about them but do you know anything about what student license can and can't do?
I have a laptop with a Intel® Core™ i7-4500U Processor which has two cores, can I make any use of the Parallel Computing Toolbox with two cores?
per isakson
per isakson le 20 Déc 2014
Modifié(e) : per isakson le 20 Déc 2014
I'm not a lawyer ... . AFAIK:
  • The student license lets you use Matlab for study, but not for anything commercial.
  • "what student license can and can't do" &nbsp use Matlab to make money
  • The student license lets you use third party code together with Matlab. The Internet hosts a lot of free Matlab m-code, some of which is very good. Read the license in each case.
On parallel computing:
  • Not worth the trouble to gain speed on your computer. Why spend days and weeks with the code to save minutes and hours in execution time. YMMV.
  • The MIT-toolbox looks solid, it might be good for study and experimenting.
  • IMO time is better spent writing good single threaded code. Run the profiler frequently.
Lastly, there are other languages. See Julia

Connectez-vous pour commenter.

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by