I am trying to to some computations and I would like to do it in parallel using parfor or by Opening the matlabpool.. as the current implementations is too slow: result=zeros(25,16000); for i = 1:length(vector1) % length is 25 for j = 1:length(vector2) % length is 16000 temp1 = vector1(i); temp2 = vector2(j); t1 = load(matfiles1(temp1).name) %load image1 from matfile1 t2 = load(matfiles2(temp2).name) % load image2 from matfile2 result(i,j)=t1.*t2 end end It work fine but I would really like to know if there is a way to speed thing up ... Thanks a lot in advance! ...

Hello all, I would like to spawn multiple matlab processes from an '.m' script. Meaning, run an m-file from a 'parent' Matlab that launches, say, 8 more 'children' matlab processes. I'd like to do it in such a way that the same m-file in the 'parent' is able to close down, or kill, all the 'children' processes. Any suggestions? Joe ...

Hello All, I'm working with an aplication that use the matlab engine. I made the C++ program and it is working well in my pc with matlab 2007b, but the same very basic program shows an error when I tried to compile it in a pc with matlab R2010b. The error is about the icuuc32.dll. ¿Why is asking this DLL? How can I solve this?. Thanks¡ ...

Hi, is it possible to create dll in Matlab and then using it in other Matlab apllication? I've made a simple function and put it into dll. But when I try to use this library in other apllication written in matlab it doesn't works. Any idea? -- Pozdrawiam, e-Shrek hi e-shresk, I once created a matlab dll, and called it in c code. it worked. I guess you have to check whether you dll was built correctly or not. ps. why don't u call matlab function directly? Dnia Mon, 26 Oct 2009 07:19:04 +0000 (UTC), Jun napisa�(a): > hi e-shresk, > > I once created a matlab dll, and called it in c code. it worked. Hmmm. The function is very simple: ========================== function var_o = testlib(var_i) if var_i == '1', var_o = 'jest'; else var_o = 'brak'; end ========================== Compilation: mcc -W lib:xlib -T link:lib testlib After it, I have *.dll *.lib *.h Tryin' to load library: loadlibrary('xlib.dll','xlib.h'); The result is: Warning: Warnings messages were produced while parsing. Check the functions you intend to use for correctness. Warning text can be viewed using: [notfound,warnings]=loadlibrary(...) > In loadlibrary at 394 Where is the problem? > ps. why don't u call matlab function directly? I have a pack of functions that I wouldlike to use with few different matlab compiled programs. -- Pozdrawiam, e-Shrek On Oct 26, 1:47=A0pm, e-Shrek <e-Shrek.wyt...@wytni...

I downloaded the MS visual C++ 2008 Express Edition and the SDK as detailed in http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/?solution=1-6IJJ3L My embedded function didnt work at the beginning because I did "mex -setup" before I installed my SDK. But after I installed the SDK, I ran "mex -setup" in Matlab once again and choose the MS visual C++2008 as my compiler. Then, my embedded matlab function worked. Thanks to the contribution from above! ...

for i=1:size(APLocation,1) point=APLocation(i,:); parfor j=1:length (RXpoint) rssi(i,j) = LOSS(point,RXpoint(:,j)'); %%rssi having the signal strength from all AP's end end when i'm running the following code, i get the same value for each element of rssi (serially i get different results) where is my problem? Creating some fake data and and implementing a simple LOSS function, I do not see a different between the serial and parallel execution. Does LOSS use any persistent or global variables? function [ rssi rssi2 ] = foo APLocation = rand(10); RXpoint = rand(10) * 5; for i=1:size(APLocation,1) point=APLocation(i,:); parfor j=1:length (RXpoint) rssi(i,j) = LOSS(point,RXpoint(:,j)'); end end for i=1:size(APLocation,1) point=APLocation(i,:); for j=1:length (RXpoint) rssi2(i,j) = LOSS(point,RXpoint(:,j)'); end end end function rv = LOSS( a,b ) rv = sum( a+b ); end "michael" <bezenchu@gmail.com> wrote in message news:ht0t0k$fce$1@fred.mathworks.com... > for i=1:size(APLocation,1) > point=APLocation(i,:); > parfor j=1:length (RXpoint) > rssi(i,j) = LOSS(point,RXpoint(:,j)'); %%rssi having the signal > strength from all AP's > end > end > > when i'm running the following code, i get the same value for each element ...

I wrote a code in matlab 7a andand it was working over there then i changed computer which was having matlab realease 2009a and it is not working If i install Matlab 7 release 14, will my code work again thanks "moonman" wrote in message <ipmsl7$23v$1@fred.mathworks.com>... > I wrote a code in matlab 7a andand it was working over there > then i changed computer which was having matlab realease 2009a and it is not working > > If i install Matlab 7 release 14, will my code work again thanks Can you be more specific about the fact that your code is not working in 2009a but worked in 2007a? It would be helpful if you could narrow down what is not working in 2009a and provide error messages. Wayne ok thanks wyne i will send error message after some hours ...

Number of column: 5 Vector A: [ 2 4 6 7 8 ] Vector B : [ 5 7 8 10 1] Choice = 1 : Find the highest value Vector A : 8 Vector B: 10 The highest value : 10 Choice = 2 : Find the lowest value Vector A : 2 Vector B: 1 The highest value : 1 Choice = 3 : Find the average value of : Vector A Vector B "Syamil " <syamilsaid@gmail.com> wrote in message <inq3g8$hhd$1@fred.mathworks.com>... > Number of column: 5 > Vector A: [ 2 4 6 7 8 ] > Vector B : [ 5 7 8 10 1] > > Choice = 1 : Find the highest value > Vector A : 8 > Vector B: 10 > The highest value : 10 > > Choice = 2 : Find the lowest value > Vector A : 2 > Vector B: 1 > The highest value : 1 > > Choice = 3 : Find the average value of : > Vector A > Vector B Type in matlab: doc min doc max doc mean ...

I have written some code in matlab for my application. I want to make a graphical interface so that an user can easily use my code. I do not know, how to link my code or a particular function when user clicks on a particular button. I mean, how to assign a function written by me to a push button so that it will execute the function. And how to give the input to my function and get output after executing the particular function. I am quiet familiar with matlab code. But I am absolutely new with GUI in matlab. Please help me to deal with the above problem. On 4/12/2011 12:37 AM, sk maidul haque wrote: > I have written some code in matlab for my application. > I want to make a graphical interface so that an user can easily use my code. > I do not know, how to link my code or a particular function > when user clicks on a particular button. I mean, how to assign a > function written by me to a push button so that it will execute the function. > And how to give the input to my function and get output after > executing the particular function. > I am quiet familiar with matlab code. But I am absolutely new with > GUI in matlab. Please help me to deal with the above problem. Use GUIDE to make the gui. It is very simple and powerful to use. I use it all the time for my school projects and HW's. I know some prefer to code the thing by hand, but I prefer GUIDE. When you add a button in GUIDE, it will create a callback stub for you automatically...

When I create a MATLAB Coder Project and try to convert this function: ------------------------- function y = myResampler(x,m,n) %#codegen fsVec = [8000 16000 32000 48000]; targetFsVec = [8000 16000 32000 48000]; fs = fsVec(m); targetFs = targetFsVec(n); y = resample(x,targetFs,fs); ------------------------- to C-code I get a build error saying: coder -build resamplerproj.prj ??? The upsample factor P must be constant. Error in ==> myResampler Line: 12 Column: 5 Code generation failed: Open error report. But I want to be able to resample x using a variable P/Q ratio. Is this just a limitation of Matlab Coder or am I doing something wrong?? John wrote: > When I create a MATLAB Coder Project and try to convert this function: > > ------------------------- > function y = myResampler(x,m,n) %#codegen > > fsVec = [8000 16000 32000 48000]; > targetFsVec = [8000 16000 32000 48000]; > > fs = fsVec(m); > targetFs = targetFsVec(n); > > y = resample(x,targetFs,fs); > ------------------------- > > to C-code I get a build error saying: > > coder -build resamplerproj.prj ??? The upsample factor P must be > constant. Error in ==> myResampler Line: 12 Column: 5 Code generation > failed: Open error report. > > > > But I want to be able to resample x using a variable P/Q ratio. > > Is this just a limitation of Matlab Coder or am I doing something wrong?? Apparently it's a limitation of RESAMPLE ...

Hi, I'm trying to make a dll from an m-file and use the dll function calling from the workspace or from an m file using 2008A version: Step 1 function [output] = addizione (a,b) output = a+b; end Step 2 I compile it with matlab compiler mcc -l addizione I obtain addizione.dll, .lib, .h etc Step 3 load the newly created addizione.dll loadlibrary ('addizione','addizione') with the following warnings: Type 'LARGE_INTEGERPtr' was not found. Defaulting to type voidPtr. Found on line 20522 of input from line 7673 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type '_TREEITEMPtr' was not found. Defaulting to type voidPtr. Found on line 20944 of input from line 8095 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type 'PROPSHEETPAGEPtr' was not found. Defaulting to type voidPtr. Found on line 21328 of input from line 8479 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type '_PSPPtr' was not found. Defaulting to type voidPtr. Found on line 21329 of input from line 8480 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type 'PROPSHEETHEADERPtr' was not found. Defaulting to type voidPtr. Found on line 21351 of input from line 8502 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type 'LARGE_INTEGER' was not found. Defaulting to type error. Found on line 21610 of input from line 8761 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type 'L...

What is happening when I type rand(1:10) at the command line? Matlab goes into a 10 minute spin - what's going on? Thanks "Robert" wrote in message <j64asi$5v4$1@newscl01ah.mathworks.com>... > What is happening when I type > rand(1:10) > at the command line? > > Matlab goes into a 10 minute spin - what's going on? > Thanks Hi Robert, You're create a 10-D array with that syntax. Do you just want a vector of 10 uniformly distributed random numbers. x = rand(10,1); % or x = rand(1,10); Wayne Hi Wayne, You're right - that's what I was trying to do... but I was just newbie mucking about trying to work out the syntax and I typed that in - then had a looong wait for Matlab to work through it! Thanks for the explanation. Robert "Robert" wrote in message <j64d2h$dvo$1@newscl01ah.mathworks.com>... > Hi Wayne, > You're right - that's what I was trying to do... but I was just newbie mucking about trying to work out the syntax and I typed that in - then had a looong wait for Matlab to work through it! > Thanks for the explanation. > Robert That's fine. Welcome to MATLAB!!! If that's the worst memory-intensive mistake you ever make, you'll be fine :) I've done much, much worse. Wayne ...

Many of you who post to this newsgroup are also regular contributors to the MATLAB Central File Exchange. Look for your favorite contributors on our File Exchange Author Profile page. You can read their profiles and see pictures: <http://www.mathworks.com/matlabcentral/reports/fileexchange/allProfiles/> In a random drawing, we recently awarded MATLAB jackets to three File Exchange authors with profile pages: Michele Giugliano, Andrey Egin, and Denis Gilbert. You can win a jacket, too. Just submit a new file to the File Exchange or update your author profile by December 2003 for a chance to win one of four MATLAB jackets. See the jacket below: <http://www.mathworks.com/matlabcentral/images/jeff3.jpg> Here are some interesting File Exchange facts: - Since its inception in 2001, visitors have downloaded more than 1.25 million submissions from the File Exchange. - In September 2003 alone, visitors downloaded 80,085 files, an average of 2670 a day! .... what if the prize was a free copy of the next version of Matlab :-) majb Min Poh wrote: ....or an offer for employment... aj "bourassa" <bourassa-m@rmc.ca> wrote in message news:3f9d507d$1@rmcnt03a.rmc.ca... > ... what if the prize was a free copy of the next version of Matlab :-) > > majb > > Min Poh wrote: > ...

Hello, I would like to know if it is possible to run multiple m-files parallelly in MATLAB. For example, suppose I need to run 'n' script files all independent of each other. I needed it for a robotics application. Is it possible to assign preferences to the processes(like in real time processes) so that a process of lesser preference is put on the hold if a more preferred task needs to be run. Please give details, as I am not very used to MATLAB. Thanks in advance. Regards... "ajay " <ajaypai88@gmail.com> writes: > I would like to know if it is possible to run multiple m-files parallelly in > MATLAB. For example, suppose I need to run 'n' script files all independent of > each other. I needed it for a robotics application. Is it possible to assign > preferences to the processes(like in real time processes) so that a process of > lesser preference is put on the hold if a more preferred task needs to be > run. Please give details, as I am not very used to MATLAB. Thanks in advance. The only way to run several MATLAB programs in parallel is to run them in separate MATLAB processes; one way that you can do that is to use our parallel computing products, see here: http://www.mathworks.com/products/parallel-computing/ For example, this would allow you to create a "parallel for" or PARFOR loop; but that does not allow you to assign relative priorities. Cheers, Edric. Edric M Ellis <eellis@mathworks.com> wrot...

Long story short, here is the criteria I need. 1) I need two modules running in parallel. One function must activate these two They don't need to START at the same time but both neither return info nor end. They run pretty much infinitely 1.1) I would prefer if the One function also ran separate from the above two in it's own loop but i can deal with a 3'rd function also not ending. 2) I need a shared variable between two of the modules. 1 Module will place information there while the other just reads it, but as they are running parallel. That's it. I can do this in pretty much any other language but matlab I've been having issues with. Problem is I absolutely need to use matlab for one module. If this is impossible to accomplish all in matlab then can i instead run this in C and call one matlab module with separate thread? Sample code below. function mainParallelTest() persistent counter; counter = 0; parfor i=0:2 if (i == 0) ImageProccessorParallelTest(); elseif(i == 1) EventProcessorParallelTest(); elseif(i == 2) prevCounter = 0; tempCounter = 1; while(true) tempCounter = counter; if (tempCounter == prevCounter) %disp('hi') end prevCounter = tempCounter; end end end "Alex Cruikshank" <cruiksam@gmail.com> writes: > Long story short, here is the criteria I need. >...

Dear All, I'm trying to develop an Matlab parallel subroutine. But the unparallel code run faster compare to the parallel one. My computer has 2 cores. PARALLEL CODE for ipod=1:nx_target*ny_target; distance = sqrt((xyz_target(1,ipod) -xg)^2 ... +(xyz_target(2,ipod) -yg)^2 ... +(xyz_target(3,ipod) -zg)^2); pres(ipod) = pres(ipod) -exp(k_tmp*distance)/distance*tmp; end UNPARALLEL CODE parfor ipod=1:nx_target*ny_target; distance = sqrt((xyz_target(1,ipod) -xg)^2 ... +(xyz_target(2,ipod) -yg)^2 ... +(xyz_target(3,ipod) -zg)^2); pres(ipod) = pres(ipod) -exp(k_tmp*distance)/distance*tmp; end I would like to understand why. Best regards Didace EKEOM ...

I don't know matlab and I begin to learn matlab for this project I need to understand every line in this code now I don't understand anything I don't understand the commands in this code and I will glad if anybody can help me to understand what is write in this code or give me a link that explain any commands that appear in this code Maybe this is a pseudo code ?? This code need to recognize fingerprint In the first picture http://img22.imageshack.us/img22/841/matlaba1.jpg I know that the first paragraph load image from memory stockpile The second paragraph does a histogram The third paragraph does FFT to enhance the picture In the second picture http://img132.imageshack.us/i/matlaba2.jpg/ The first paragraph receive picture in size of 32X32 and transform the picture to binary picture The second paragraph the size of the picture is 16X16 and do bwmorph and bwperim The third paragraph do inbound and inArea and return roiImg, roiBound and roiArea In the third picture http://img264.imageshack.us/i/matlaba3.jpg/ the first paragraph do lines thinning with bwmorph function that is function that was write and thin function that is function in matlab that I don't understand The second paragraph remove type H blocks with bwmorph function and clean this is function in matlab that I don't understand The third paragraph remove spikes with bwmorph function and spur function that is matlab function that I don't understand The fourth paragraph receive 4 val...

Is any body doing parallel computing with matlab here? ...

Hi, I'm trying to make a dll from an m-file and use the dll function calling from the workspace or from an m file using 2008A version: Step 1 function [output] = addizione (a,b) output = a+b; end Step 2 I compile it with matlab compiler mcc -l addizione I obtain addizione.dll, .lib, .h etc Step 3 load the newly created addizione.dll loadlibrary ('addizione','addizione') with the following warnings: Type 'LARGE_INTEGERPtr' was not found. Defaulting to type voidPtr. Found on line 20522 of input from line 7673 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type '_TREEITEMPtr' was not found. Defaulting to type voidPtr. Found on line 20944 of input from line 8095 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type 'PROPSHEETPAGEPtr' was not found. Defaulting to type voidPtr. Found on line 21328 of input from line 8479 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type '_PSPPtr' was not found. Defaulting to type voidPtr. Found on line 21329 of input from line 8480 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type 'PROPSHEETHEADERPtr' was not found. Defaulting to type voidPtr. Found on line 21351 of input from line 8502 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type 'LARGE_INTEGER' was not found. Defaulting to type error. Found on line 21610 of input from line 8761 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type 'L...

My problem with matlab script node is related to calling function in matlab. I created an m-file function that takes an imput temperature (from DAQ) and defines a material property. My matlab script node doesn't seem to recognize my function. I have placed the function in the folder the vi is currently located, but it doesn't read it. How do I get matlab script node to read the functions I create in matlab? Add the directory to matlab path, or call the .m file with it full name ( D:\..... \myfile.m) Let me clarify, I have pasted my matlab code into the matlab scrip node. In this code, I have called a subfunction that I have created. Example k(n)=k_c(T(n)) where k_c is a subfunction I have created. How do I get my code in the node to sucessfully read the subfunction k_c? As indicated, you need to add the directory where the .m file containing the function resides to the list of paths that are read in. This is your startup.m file. The other option is to do a "cd" command prior to calling your function to change to the directory where the .m file containing the function resides. Thanks for reiterating the information. My matlab script node is working properly. I had never used the "cd" command in matlab. I always set the working directory when I open the program, and put all the m files into t...

I did a simple excel macro which runs matlab functions sucessfully in a machine with Matlab installed. Now I want to run it in a computer without matlab, with "MATLAB Compiler Run Time" installed. I can add the Matlb automation server type file (mlapp.tlb) sucessfully, but when I try to run it, I get this error: "ActiveX component can't create object" In this line: Set matlab = New MLApp.MLApp Do you know what is missing? Thanks ...

Hi, I am running a MatLab program I've run many times before, and now when I try to run it, I get a message saying : "This program has been modified outside of the MatLab editor. Do you want to reload it?" I've moved the program to a new directory, but I've run MatLab progs from that directory before, so I am perplexed. Can anyone tell me what to do? TIA, Matt In article <972bbd06-3687-4253-9aa0-a08acf91d117@z38g2000hsc.googlegroups.com>, junoexpress <MTBrenneman@gmail.com> wrote: >I am running a MatLab program I've run many times before, and now when >I try to run it, I get a message saying : >"This program has been modified outside of the MatLab editor. Do you >want to reload it?" >I've moved the program to a new directory, but I've run MatLab progs >from that directory before, so I am perplexed. >Can anyone tell me what to do? Use Save As to save the current version under a different name. Then allow Matlab to reload the file. Save that, and then compare the two saved versions to determine what the differences are, and create an appropriately merged version. -- "There is nothing so bad but it can masquerade as moral." -- Walter Lippmann junoexpress <MTBrenneman@gmail.com> wrote in message <972bbd06-3687-4253-9aa0- a08acf91d117@z38g2000hsc.googlegroups.com>... > Hi, >...

Hi all, I am doing a course project. Try to make phone upload some data to server through PHP script and make Matlab read this file (.txt or any file), process, and write a result file on server. After that, my phone can download the result. The key part is that can I use PHP to call matlab function? Or any mechanism I can use to call Matlab through server-end script? My server will be the local hosted server on Mac computer. Also, Matlab is installed on my mac too. Thanks you very much. On Oct 7, 11:54=A0am, Lucas Sun <feng...@gmail.com> wrote: > Hi all, > > I am doing a course project. Try to make phone upload some data to > server through PHP script and make Matlab read this file (.txt or any > file), process, and write a result file on server. After that, my > phone can download the result. > > The key part is that can I use PHP to call matlab function? Or any > mechanism I can use to call Matlab through server-end script? My > server will be the local hosted server on Mac computer. Also, Matlab > is installed on my mac too. > > Thanks you very much. I m also finding this...... ...

Hi, I'm trying to make a dll from an m-file and use the dll function calling from the workspace or from an m file using 2008A version: Step 1 function [output] = addizione (a,b) output = a+b; end Step 2 I compile it with matlab compiler mcc -l addizione I obtain addizione.dll, .lib, .h etc Step 3 load the newly created addizione.dll loadlibrary ('addizione','addizione') with the following warnings: Type 'LARGE_INTEGERPtr' was not found. Defaulting to type voidPtr. Found on line 20522 of input from line 7673 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type '_TREEITEMPtr' was not found. Defaulting to type voidPtr. Found on line 20944 of input from line 8095 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type 'PROPSHEETPAGEPtr' was not found. Defaulting to type voidPtr. Found on line 21328 of input from line 8479 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type '_PSPPtr' was not found. Defaulting to type voidPtr. Found on line 21329 of input from line 8480 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type 'PROPSHEETHEADERPtr' was not found. Defaulting to type voidPtr. Found on line 21351 of input from line 8502 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type 'LARGE_INTEGER' was not found. Defaulting to type error. Found on line 21610 of input from line 8761 of file C:\Programmi\MATLAB\R2008a\sys\lcc\include\win.h Type 'L...

Analog signal processing is any signal processing conducted on analog signals by analog means. "Analog" indicates something that is mathematically ...

At CES, Conexant gave me a demo of some of the audio processing technology that they've been working on. Conexant is a company that probably ...

The way we pay has changed dramatically. People are using their smartphones for every kind of formal and informal transaction — to shop at stores, ...

While it’s not uncommon to hear about chicken products that end up containing wayward bits of plastic (like this nugget issue , this sausage ...

Obama Administration Enacts More Gun Control By Misusing FBI Background Check System

In case you hadn't already guessed it, Marco Rubio's got a smile and a stump speech, but that's about it. Reporters who have followed him from ...

Turning raw ingredients into something more has played an important role in our evolution.

“Selfie stick. Snap. Upload to Facebook. 52 likes in a matter of minutes. These likes include people from all over the world who simply have ...

Arduino-Processing-Laser-CNC - Arduino feat. Processing Laser CNC Project

This is a guest repost by Barzan Mozafari , who is part of a new startup, www.snappydata.io , that recently launched an open source OLTP + OLAP ...

Resources last updated: 3/31/2016 4:35:49 AM