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'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¡ ...

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! ...

Hi , I am profiling code in two different versions of MATLAB (2009a and 2012a). The machine 2012a is installed is newer than the machine with 2009a, and thus, a better CPU. However, when I execute the following: A=magic(10000) A.*A I received two different timing results, the 2009a results (414.0415 seconds) are much lower than 2012a (574.746 seconds). Any suggestion on why this is the case would be greatly appreciated. Also, all other subsecquent code in MATLAB 2012a is much lower than 2009a. Thanks On 29 apr, 15:30, "Jerome " <the_r...@hotmail.com> wrote: > Hi , > I am profiling code in two different versions of MATLAB (2009a and 2012a). The machine 2012a is installed is newer than the machine with 2009a, and thus, a better CPU. However, when I execute the following: > > A=magic(10000) > A.*A > > I received two different timing results, the 2009a results (414.0415 seconds) are much lower than 2012a (574.746 seconds). Any suggestion on why this is the case would be greatly appreciated. > > Also, all other subsecquent code in MATLAB 2012a is much lower than 2009a. > > Thanks Simple question, but hard to answer: What happens if you exchange Matlab versions? I know, too much trouble, but this may shed some light on your problem. And do you have more memory available to the 2009a version? Just some thoughts. Good luck "Jerome " <the_rome@hotmail.com> wrote in message <jnjfp0$9fc$1@newscl01a...

Is there a variable I can query to discover the version of matlab I am using while running a file. The old code for imhist does not work with the new imhist code (the new code is much better) I would like to have a statement saying IF (MATLAB < 2007) use this ELSE use imhist END Does this exist? thank you Erik wrote: > Is there a variable I can query to discover the version of matlab I am using while running a file. AllVers = ver; ThisVer = AllVers(strcmp({AllVers.Name},'MATLAB')); You can then either look at ThisVer.Release(2:end-1) to get out 'R2007a' (for example), or at ThisVer.Version to get out '7.4' (for example) "Erik " <Idont@wantSpam.co> wrote in message news:gd35ou$l1m$1@fred.mathworks.com... > Is there a variable I can query to discover the version of matlab I am > using while running a file. > > The old code for imhist does not work with the new imhist code (the new > code is much better) I would like to have a statement saying > > IF (MATLAB < 2007) > use this > ELSE > use imhist > END > > > Does this exist? Use VER, VERSION, and/or VERLESSTHAN: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/ver.html http://www.mathworks.com/access/helpdesk/help/techdoc/ref/version.html http://www.mathworks.com/access/helpdesk/help/techdoc/ref/verlessthan.html As the Remarks section of the VERLESSTHAN reference page indicates, if your version of MATLAB doesn&#...

Dear friends, I have made a m-file to solve an ODE with boundary conditions by bvp4c function. However, I can not run it on my MATLAB version (R2008a), besides it runs very well on MATLAB version of my colleague. The errors that appears on my version are: ??? Error using ==> times Matrix dimensions must agree. Error in ==> odenumjac at 121 del = (s - (~s)) .* abs(del); % keep del pointing into region Error in ==> bvp4c>BCnumjac at 966 [dBCdya,ignored,ignored1,nbc] = odenumjac(@bcaux,bcArgs,bcVal,dBCoptions); Error in ==> bvp4c>colloc_Jac at 671 [dGdya,dGdyb,nbc] = BCnumjac(bc,ya,yb,n,npar,nExtraArgs,ExtraArgs); Error in ==> bvp4c at 187 [dPHIdy,NF,NBC] = colloc_Jac(n,x,Y,yp,Fmid,ode,bc,Fjac,BCjac,npar,... Error in ==> nelsonreatorteste at 8 sol = bvp4c(@fun,@cc,solini); How can I run this m-file in my MATLAB version? Thank you for any informations, Sincerely, Isaías "Isaías Soares" <ibaso2@yahoo.com.br> wrote in message <j3o068$4mo$1@newscl01ah.mathworks.com>... > Dear friends, > > I have made a m-file to solve an ODE with boundary conditions by bvp4c function. However, I can not run it on my MATLAB version (R2008a), besides it runs very well on MATLAB version of my colleague. The errors that appears on my version are: > > ??? Error using ==> times > Matrix dimensions must agree. > > Error in ==> odenumjac...

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: > ...

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 ...

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. >...

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 ...

Hello everyone, I have a matlab in class exercise due in few days. I am new to matlab and the instructions provided with the assignment is minimal. Can Someone help me with the basic understanding as in how can I map the problem's solution to matlab script ? I am not able to post question here as it is a jpeg file. Please let me know and then we can discuss further. ...

Hello, I'm evaluating products for writing my final university thesis. I want to perform image processing algorithms (C-Code compiled for a DSP). I have the feeling that manual programming of this algorithms is no longer state of the art. Instead MDSD (model driven software development) - that means Code Generation - seems to be smarter to me. Unfortunately Mathworks offers no licenses of Matlab Coder (or Simulink Coder etc.) to individual students. And I cannot afford to buy a commercial license (which probably would cost me more than 5.000 EUR/$ / my absolute limit is 1.000 EUR/$). Is there any possibility for me to use MDSD (code generation) for image processing for my university thesis ? Maybe by using cheaper alternatives ? Or by using 3d party software (like target link) ? Or export/import to another product ? Any idea ? (I want to avoid manual coding - like using OpenCV) By the way, does anyone know, why Mathworks hides the MDSD features from students ? It doesn't make sense to me that Mathworks reduces the amount of engineers available on the job market that are capable of handling (serious) Matlab projects. (Microsoft offers the "Visual Studio Express Edition" for free for education and the amount of people on the job market that are experienced in Visual Studio is tremendous.). Thank you, Roelof ...

Hi , I have installed MATLAB 7, now if I want to install 6.5 then how to change the version of MATLAB files which are made in version 7, as some files of newer version may not work in older version? "rajesh " <rajesh.shaw@gmail.com> wrote in message news:ff9e6t$26v$1@fred.mathworks.com... > Hi , > I have installed MATLAB 7, now if I want to install 6.5 > then how to change the version of MATLAB files which are > made in version 7, as some files of newer version may not > work in older version? There is NO version number for your m files when you create them? they are just plain text file. But If you create an .m file which runs ok under version 7, and you want this file to run ok under earlier versions (assuming it does not), then you need to make the necessary changes in your m file to make it run under earlier versions (this is sometimes called backporting). But if your m file calls function(s) that are part of Matlab and those functions only exist in version 7 and not in the erarlier version, then you might be out of luck there. I am not sure why you want to do this. The common practice is to go the other way. Any reason why, if you have version 7 you want to use version 6.5? may be if you give the reason it would help to give you a better advice. Nasser On Oct 18, 10:13 pm, "Nasser Abbasi" <n...@12000.org> wrote: > "rajesh " <rajesh.s...@gmail.com> wrote in message > > ne...

In MatLab 6.5, the routine above works normal: figure; sem=Average(:,2)./sqrt(Average(:,3)); bar([1:1:7],Average(:,1),sem); ylabel('% of epochs analyzed') xlabel('Frequency Band') title ('Occurrence of Oscillatory Events - Ch X') %Where Average and sem are vectors; But, in MatLab 7.0, the same code cause the following error: ??? Error using ==> xychk Too many input arguments. Error in ==> bar at 53 [msg,x,y] = xychk(args{1:nargs},'plot'); Error in ==> cross_subj_analysis>ok_Callback at 327 bar([1:1:7],Average(:,1),sem); I'd like to know why this occour. Thanks Henrique In article <g7a1j6$l1$1@fred.mathworks.com>, Henrique Amaral <henriquetomaz@uol.com.br> wrote: >In MatLab 6.5, the routine above works normal: >figure; >sem=Average(:,2)./sqrt(Average(:,3)); >bar([1:1:7],Average(:,1),sem); >ylabel('% of epochs analyzed') >xlabel('Frequency Band') >title ('Occurrence of Oscillatory Events - Ch X') >%Where Average and sem are vectors; >But, in MatLab 7.0, the same code cause the following error: >??? Error using ==> xychk >Too many input arguments. >Error in ==> bar at 53 > [msg,x,y] = xychk(args{1:nargs},'plot'); >Error in ==> cross_subj_analysis>ok_Callback at 327 >bar([1:1:7],Average(:,1),sem); >I'd like to know why this occour. When the third argument is numeric, it must be the bar width. barwidth must b...

Hi, I have a question regarding using compiled Matlab executables. I have a compiled Matlab code that runs. When the code runs, it creates a folder inside "T:\Temp\mcrCache7.14". For some reason I have to erase that directory every time I need to run the code, otherwise, it fails. So I wrote a PERL script to call the Matlab executable and to handle the erasing of the directory inside the mcrCache directory. All is well so far. The problem is that now I am running such Matlab compiled code in parallel, and I guess now that creates a problem. Now, the PERL scripts might erase the mcrCache while other PERL script is still running! Questions: 1) I wonder why we even need that mcrCache in the first place. Why can't Matlab just compile an executable that contains everything it needs (self-contained) and that runs locally??? 2) If the mcrCache is something that is needed and I can't take away (see question 1), then how do I handle this problem of running in parallel a compiled Matlab program? Any help in this matter is appreciated. Thanks, Noel Andres ...

Hi guys, I would like to know if there is a way to keep all my toolboxes that i have on version 2010a if i were to purchase the 2011b version? From my understanding, you cant do that. But then again i wouldn't want to re-order all the toolboxes that i have already paid for. Is there a way around this - i have a student version by the way Thanks Loic "Loic Niragire" <bvyp@iup.edu> wrote in message <j3qnj9$3lg$1@newscl01ah.mathworks.com>... > Hi guys, > I would like to know if there is a way to keep all my toolboxes that i have on version 2010a if i were to purchase the 2011b version? From my understanding, you cant do that. But then again i wouldn't want to re-order all the toolboxes that i have already paid for. Is there a way around this - i have a student version by the way > > Thanks > Loic If you have the student version, your flexibility concerning this issue is zero. The toolboxes are only compatible with the MATLAB version used. and I think MATLAB only release the "a" version now for students(not completely sure about that). the toolboxes are only $29 each, no big deal. ...

Hi all, I'm building a java swing based GUI for my Matlab application. As such, user input is available as text strings, for example "{[0; 0], [3.5 0; 0 2]}" (mean vector and covariance matrix of a 2D Gaussian). The user input will be passed to the compiled matlab method as a MWCellArray. Problem is how do a convert (parse) the above string into a MWCellArray? From its javadoc http://www.mathworks.com/access/helpdesk/help/toolbox/javabuilder/MWArrayAPI/index.html the following method is available: java.lang.String toString() Returns a string representation of this array, but the reverse method is not. Evidently, parsing a string like the one above is a non trivial task and I'm loath to attempt writing one by myself. I would be very thankful if someone can point me to the required parser implementation. Matlab itself is carrying out this task all the time, perhaps it is possible to access Matlab's own parser. Help much appreciated, Ritesh ...

Hello, I need to manipulate some tabular data which have been dumped from a database table into a CSV file. I read them with textscan and convert them into a structure like this: C = textscan(fid,'%d%s%s%s%s%s','delimiter',','); mystructure.field1 = C{1}; mystructure.field2 = C{2}; [...] Basically, mystructure represents the database table the data was dumped from (with column names as fields). I would like to manipulate mystructure like it were a database table, e.g. filtering it and projecting on some columns. Basically, I would like to use a Linq-like syntax like this: mystructure2 = where(mystructure, @(x) (x.field1 == 3)) and something similar for the projection. Any idea? Thanks ...

Please advise. I have installed Matlab 2011a on a Window 7 64 bit OS laptop. Will it run smoothly? If not what are the fixes? Thanks RR ...

I have used MATLAB for few hours.So I don't know the differences between version 6.5 and 7.0.I want to use some codes of MATLAB 7.0, but they doesn't work in MATLAB 6.5.How to change these codes so that they can work in matlab 6.5.Waiting for your help. Thank you . The codes are like this .I think changing the function findPI may work ,but I don'y know how % PIfun.m % Evaluate a function used to find the PI-line, using Kyle Champley's % method. % % Adam Wunderlich % last update: 5/18/06 function y = PIfun(r,R,h,gamma,x3,sb) temp = R - r*cos(gamma-sb); y = h*((pi - 2*atan(r*sin(gamma-sb)/temp))*(1 + (r^2 - R^2)/ (2*R*temp)) ... + sb) - x3; % find_PI_Line.m % % Find the the parametric interval corresponding to the unique PI-line % passing through the point x for a given helical pitch. % This code implements the method of Kyle Champley. % inputs: P = pitch (cm/turn), R = helix radius, delta_s = s stepsize, x % output: PI = [sb st] % % Adam Wunderlich % last update: 5/18/06 function [PI] = findPI(P,R,delta_s,x) h = P/(2*pi); r = sqrt(x(1)^2+x(2)^2); gamma = atan2(x(2),x(1)); options = optimset('TolX',h*delta_s/100,'FunValCheck','on'); [sb,fval,exitflag] = fzero(@(sb) PIfun(r,R,h,gamma,x(3),sb),... [(x(3)-h*pi)/h,x(3)/h],options); if exitflag ~=1, disp('Error: PI invalid'); end % note that beta=sb in Kyle's formula alphaX = atan(r*sin(gamma-sb)/(R - r*cos(gamma-sb))); st = sb + pi -...

Hi! I opened the matlab script fractal.vi then my antivirus (Kaspersky) ask if I acept the modified te registry of matlab setup, I say "yes" After that when I want open matlab the setup run but inmediatly it's close, why???? Hola: Abri el matlab script fractal.vi y mi antivirus (Kasoersky)me preguntaba si aceptaba una modificacion del registro del setup de matlab yo acepte Despues de eso cuanto abro matlab se cierra inmediatamente porque?? Hola Sa�l Es probable que el problema est� relacionado con el antivirus Kaspersky, trata de deshabilitarlo y correr nuevamente el ejemplo. Si esto no funciona revisa el estado de tus licencias de LabVIEW y de Matlab, probablemente tengas que reinstalar el programa y/o activar las licencias. �Qu� versi�n de LabVIEW y Matlab tienes? �El comportamiento es el mismo con el otro ejemplo?, me refiero al de la siguiente dir: labview\examples\scriptnode\Differential Equation.llb\MATLAB Script - Lorenz Diff Eq.vi Si corres este ejemplo �El antivirus tambi�n te pregunta cambiar lo de los registros?, ser�a bueno contactar a Mathworks para saber c�mo reconfigurar nuevamente los registros de Matlab ...

Hi! I have recently installed Matlab 7.0. I have save my simulation results in .MAT file. However, these MAT files can't be opened using Matlab 6.5.1. I encountered problem as follows: ??? Error using ==> load Unable to read MAT file D:\MATLAB7\work\results.mat File may be corrupt. How can I solve this problem? Thanks. Linda Please see here: <http://tx.technion.ac.il/~perryb/matlab7/mat7.pdf> In short, save again as: The new features and enhancements are described in the "Release notes" of Matlab. A new feature that causes incompatibility with previous versions of Matlab is the new encoding of MAT files. Matlab release 14 writes character and figure data to MAT-files using Unicode encoding by default. Unicode encoded MAT-files are not readable by earlier versions of Matlab. If you intend to load your MAT-files created with Matlab release 14, you must override the Unicode default during the save. You can override the default encoding by using the -v6 switch with save and hgsave: save filename -v6 hgsave filename -v6 Hope it helps Linda wrote: > > > Hi! > > I have recently installed Matlab 7.0. > I have save my simulation results in .MAT file. > However, these MAT files can't be opened using Matlab 6.5.1. > > I encountered problem as follows: > > ??? Error using ==> load > Unable to read MAT file D:\MATLAB7\work\results.mat > > File ma...

Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Within days of the launch of Donald J. Trump's presidential campaign last June, he entered a parallel universe of his unique creation – a universe ...

Within days of the launch of Donald J. Trump's presidential campaign last June, he entered a parallel universe of his unique creation – ...

Starting today, Parallels is offering a new bundle for a limited time that will let you get 81% off 7 great Mac apps with the purchase or upgrade ...

... through the scenes, pick up items, and obtain clues. Unlock different locations to explore and search for the secrets behind this hidden, parallel ...

... and trimmed his price target to $25 from $28, writing that there’s more “upside” in other names, and that he sees several disturbing parallels ...

It may have been intended as a general allegory to issues regarding security and freedom being played out on the international stage. But today's ...

Ask not for whom the fat lady sings.

Stocks haven't done much in a while, and that could create some concerning questions for historically minded traders.

JOHANNESBURG (AP) — Speaking in an old fort and prison from South Africa's era of white domination, a former anti-apartheid leader hinted that ...

Resources last updated: 3/30/2016 6:40:53 PM