f



Matlab crashes when running fortran mex file

First of all, I have ubuntu with gfortran 4.6.1 and f95 4.6.1compiler and I am using the mtlab R2007a.

The problem is when I compile the examples code "timetwo.F" given  in matlabroot/extern/examples/refboof, compilations goes through but when I run it in the matlab, matlab crashes. I think I have library compatibity issues because the code runs fine on my other machine which have older libraries.

Here is what are the libraries in my matlabR2007a/sys/os/glnxa64 folder:

libgfortran.so.1 -> /usr/lib/x86_64-linux-gnu/libgfortran.so.3
libiberty.so
libXm.so.3 -> libXm.so.3.0.1
libXm.so.3

Note that I have pointed libgfortran.so.1 to the system fortran library rather than the one that came with matlab. But even if I do not change (keep the same that came with matlab), output is the same. It crashes.

===========
Also does someone know wht we need to have the libgfortran.so.1 file. Why doesnt it take this library from the system libraries like other C libraries. I am saying this because when I do not have this library and try to start the matlab I get this error:

libmwlapack: load error: libgfortran.so.1: cannot open shared object file: No such file or directory
terminate called after throwing an instance of 'std::runtime_error'
  what():  libgfortran.so.1: cannot open shared object file: No such file or directory
Aborted


Please help me... I am banging my head over this.
0
arvind385 (2)
11/29/2011 11:17:09 PM
comp.soft-sys.matlab 211266 articles. 23 followers. lunamoonmoon (257) is leader. Post Follow

2 Replies
970 Views

Similar Articles

[PageSpeed] 30

On 30 Nov, 00:17, "AA " <arvind...@gmail.com> wrote:
> First of all, I have ubuntu with gfortran 4.6.1 and f95 4.6.1compiler and=
 I am using the mtlab R2007a.
>
> The problem is when I compile the examples code "timetwo.F" given =A0in m=
atlabroot/extern/examples/refboof, compilations goes through but when I run=
 it in the matlab, matlab crashes. I think I have library compatibity issue=
s because the code runs fine on my other machine which have older libraries=
..
>
> Here is what are the libraries in my matlabR2007a/sys/os/glnxa64 folder:
>
> libgfortran.so.1 -> /usr/lib/x86_64-linux-gnu/libgfortran.so.3
> libiberty.so
> libXm.so.3 -> libXm.so.3.0.1
> libXm.so.3
>
> Note that I have pointed libgfortran.so.1 to the system fortran library r=
ather than the one that came with matlab. But even if I do not change (keep=
 the same that came with matlab), output is the same. It crashes.
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Also does someone know wht we need to have the libgfortran.so.1 file. Why=
 doesnt it take this library from the system libraries like other C librari=
es. I am saying this because when I do not have this library and try to sta=
rt the matlab I get this error:
>
> libmwlapack: load error: libgfortran.so.1: cannot open shared object file=
: No such file or directory
> terminate called after throwing an instance of 'std::runtime_error'
> =A0 what(): =A0libgfortran.so.1: cannot open shared object file: No such =
file or directory
> Aborted
>
> Please help me... I am banging my head over this.

A very similar question was discussed here not long ago:

https://groups.google.com/group/comp.soft-sys.matlab/browse_frm/thread/67c2=
d6c2423fb61e/1e28ec7e40dea19f?hl=3Dno&lnk=3Dgst&q=3Drune+fortran#1e28ec7e40=
dea19f

Rune
0
allnor (8509)
11/29/2011 11:24:44 PM
Rune Allnor <allnor@tele.ntnu.no> wrote in message <e622c0e3-7173-4b38-a9b1-c51a57b88fe7@x7g2000yqb.googlegroups.com>...
> On 30 Nov, 00:17, "AA " <arvind...@gmail.com> wrote:
> > First of all, I have ubuntu with gfortran 4.6.1 and f95 4.6.1compiler and I am using the mtlab R2007a.
> >
> > The problem is when I compile the examples code "timetwo.F" given  in matlabroot/extern/examples/refboof, compilations goes through but when I run it in the matlab, matlab crashes. I think I have library compatibity issues because the code runs fine on my other machine which have older libraries.
> >
> > Here is what are the libraries in my matlabR2007a/sys/os/glnxa64 folder:
> >
> > libgfortran.so.1 -> /usr/lib/x86_64-linux-gnu/libgfortran.so.3
> > libiberty.so
> > libXm.so.3 -> libXm.so.3.0.1
> > libXm.so.3
> >
> > Note that I have pointed libgfortran.so.1 to the system fortran library rather than the one that came with matlab. But even if I do not change (keep the same that came with matlab), output is the same. It crashes.
> >
> > ===========
> > Also does someone know wht we need to have the libgfortran.so.1 file. Why doesnt it take this library from the system libraries like other C libraries. I am saying this because when I do not have this library and try to start the matlab I get this error:
> >
> > libmwlapack: load error: libgfortran.so.1: cannot open shared object file: No such file or directory
> > terminate called after throwing an instance of 'std::runtime_error'
> >   what():  libgfortran.so.1: cannot open shared object file: No such file or directory
> > Aborted
> >
> > Please help me... I am banging my head over this.
> 
> A very similar question was discussed here not long ago:
> 
> https://groups.google.com/group/comp.soft-sys.matlab/browse_frm/thread/67c2d6c2423fb61e/1e28ec7e40dea19f?hl=no&lnk=gst&q=rune+fortran#1e28ec7e40dea19f
> 
> Rune

answer their suggest that there is a coding error in the code but I do not think it's true for two reasons:
1. I am having the same problem with my other code
2. timestwo.F is running perfectly fine on my other machine.

Any more help
0
arvind385 (2)
11/29/2011 11:41:08 PM
Reply:

Similar Artilces:

Why can't Fortran-mex files be compiled on matlab V5.3 and run on matlab V6?
Hi, does anyone know why Fortran-mex files can't be compiled on matlab V5.3 and run on matlab V6? For example: if I compile the example-program (shipped with matlab) timestwo.f on matlab version 5.3 (R11) and try to run it on matlab version 6+ (R12 or R13), I get the error message: "Unable to load mex file: E:\timestwo.dll. The specified module could not be found. ??? Invalid MEX-file" Likewise if I compile it on matlab version 6.1 (R12), I get a similar error message if run on matlab version 5.3 (R11). However, if I run it on matlab version 6.5 it works OK. If I try the same experiment with the corresponding example file written in C, timestwo.c, I get no such problems. Why is that? Per A. Hi Per, usually MEX-files need to be compiled with the MATLAB version you want it later to run with. The reason is, that the code links against the current dynamic libraries (DLLs), which may change from version to version. You may have luck that it works (see your example of timestwo.f), but you should never rely on this. Titus "Per A. Brodtkorb" <Per.Brodtkorb@ffi.no> wrote in message news:eecb303.-1@webx.raydaftYaTP... > Hi, > > does anyone know why Fortran-mex files can't be compiled on matlab > V5.3 and run on matlab V6? > > For example: if I compile the example-program (shipped with matlab) > timestwo.f > on matlab version 5.3 (R11) and try to run > it on matlab version 6+ (R12 or R13), I ...

Mex file crashes Matlab
Hello all, I created successfully a mex file. It is linked to an external dll and it worked fine (it returns correctly to matlab a vector). Recently I added an new function inside my c++ file which does not affect the result of the c++ function but is just used to improve some data manipulation. By the way, this function works quite well in a simple c++ file and I have already used many times in other c++ files (no-mex files). After added this function my matlab crashes and returns me this error: MATLAB crash file:C:\DOCUME~1\MILCEMEA~1.VAA\LOCALS~1\Temp\matlab_crash_dump.2996 ------------------------------------------------------------------------ Segmentation violation detected at Wed Jul 28 18:38:04 2010 ------------------------------------------------------------------------ Operating System: Microsoft Windows XP Window System: Version 5.1 (Build 2600: Service Pack 3) Processor ID: x86 Family 6 Model 7 Stepping 10, GenuineIntel Virtual Machine: Java 1.6.0_04-b12 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode Default Encoding: windows-1252 Fault Count: 1 Register State: EAX = ffff5df8 EBX = 00c2e01c ECX = ffffffff EDX = e06d7363 ESI = ffff5df4 EDI = 04f169ec EBP = 00c2e028 ESP = 00c2cf40 EIP = 04ec186e FLG = 00010286 Stack Trace: [0] qlDiscountFactors.mexw32:0x04ec186e(0x00c2e158 "x£", 0x00c2e0b8, 0x00c2e1fc, 0) [1] 0x00c2e20c(0x8b00032b, 0x04c483d8, 0x85e85d89,...

Call Matlab m-file from Matlab Scrip Node
My problem with matlab script node is related to calling function in matlab.&nbsp; I created an m-file function that takes an imput temperature (from DAQ) and defines a material property.&nbsp; My matlab script node doesn't seem to recognize my function.&nbsp; I have placed the function in the folder the vi is currently located, but it doesn't read it.&nbsp; 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, &nbsp; I have pasted my matlab code into the matlab scrip node. &nbsp; In this code, I have called a subfunction that I have created. &nbsp; Example k(n)=k_c(T(n)) where k_c is a subfunction I have created. &nbsp; How do I get my code in the node&nbsp;to sucessfully read the subfunction k_c? &nbsp; &nbsp; &nbsp; 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.&nbsp; My matlab script node is working properly.&nbsp; I had never used the "cd" command in matlab.&nbsp; I always set the working directory when I open the program, and put all the m files into t...

MATLAB FFTW MEX CRASH
I'm trying to compile FFTW library functions into a mex C++ file. I managed to compile the file successfully. "mex filename.cpp -I/path/to/include -L/path/to/lib -lm -lfftw3 -output test" But when I run from MATLAB cmd window, MATLAB will crash with segmentation fault. Anyone has any suggestions, thanks the code is very simple as follows: #include "mex.h" #include "stdlib.h" #include "stdio.h" #include "fftw3.h" /* $Revision: 1.8.6.3 $ */ void timestwo(double y[], double x[]) { y[0] = 2.0*x[0]; } void test_fftw() { int N=8; double *in, *in2; fftw_complex *out; fftw_plan p, p_rev; in = (double*)fftw_malloc(sizeof(double)*N); in2 =(double*) fftw_malloc(sizeof(double) * N); out = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * N); fftw_free(in); fftw_free(in2); fftw_free(out); } void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ) { double *x,*y; mwSize mrows,ncols; /* Check for proper number of arguments. */ if(nrhs!=1) { mexErrMsgTxt("One input required."); } else if(nlhs>1) { mexErrMsgTxt("Too many output arguments."); } /* The input must be a noncomplex scalar double.*/ mrows = mxGetM(prhs[0]); ncols = mxGetN(prhs[0]); if( !mxIsDouble(prhs[0]) || mxIsComplex(prhs[0]) || !(mrows==1 && nco...

File conversion: fortran to matlab
Hello I have gone through google search, other forums and similar message posted here also. I have not got really a way to convert f90 file to matlab file. Its really a big file. Can anyone please help me? Thanks. I just did it today, on a 300 line file, by hand. If you know Matlab, Fortran isn't that much different I don't think. Just copy and paste, do some rearranging and relabeling, and you're done. Really, I have no Fortran training at all and I figured it out in less than an hour. I did have to use the online Fortran reference at IBM a couple of times to find out the syntax of the IF statements, DO loops, etc. It still wasn't that bad. "Sneha " <smithpamola@yahoo.com> wrote in message news:g3s1et$g8e$1@fred.mathworks.com... > Hello > > I have gone through google search, other forums and similar > message posted here also. I have not got really a way to > convert f90 file to matlab file. Its really a big file. > Can anyone please help me? As an alternative to converting over the file, you may be able to write a wrapper to make this into a MEX-file: http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/bp_kqh7.html The third and fifth items could be useful for you. -- Steve Lord slord@mathworks.com "Sneha " <smithpamola@yahoo.com> wrote in message <g3s1et$g8e$1@fred.mathworks.com>... > Hello > > I have gone through google search, other forums and simi...

can't run matlab setup/No puedo correr matlab
Hi! I opened the&nbsp;matlab script fractal.vi&nbsp;then my antivirus (Kaspersky)&nbsp;ask&nbsp;if I acept the modified te registry of matlab setup,&nbsp; I &nbsp;say "yes" After that when I want open matlab the setup run but inmediatly it's close, why???? &nbsp; 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?? &nbsp; &nbsp; &nbsp; Hola Sa�l Es probable que el problema est� relacionado con el antivirus Kaspersky, trata de deshabilitarlo y correr nuevamente el ejemplo.&nbsp; 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 ...

Incompatible of MAT file for Matlab 6.5.1 and Matlab 7.0
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...

Create icon on desktop and run matlab files
Hello !! I have created a matlab program and i would like to create a icon on desktop to run my program without opening matlab and press the run button ! I want to make my program be able to be runned from people they dont know about program tools ... "Konstantinos Bonis" <malias_g7@hotmail.com> wrote in message news:jca57o$kf8$1@newscl01ah.mathworks.com... > Hello !! > I have created a matlab program and i would like to create a icon on > desktop to run my program without opening matlab and press the run button > ! I want to make my program be able to be runned from people they dont > know about program tools ... Either use the -r startup option to start MATLAB as the target of your shortcut or, if you don't want MATLAB to be visibly opened, use MATLAB Compiler to generate a standalone application. http://www.mathworks.com/help/techdoc/matlab_env/f8-4994.html http://www.mathworks.com/help/toolbox/compiler/ -- Steve Lord slord@mathworks.com To contact Technical Support use the Contact Us link on http://www.mathworks.com Im trying to generate a standalone application by using Matlab Compiler but i have some problems.. Im trying to do it by usning the : mcc -mv squareA.m which i found here http://www.mathworks.com/help/toolbox/compiler/f7-996249.html but its saying me to choose a compiler and i dont know what to do .. Im sorry for so many questions but its the first time trying to do it and i found things a bit hard....

OT: Fortran Matlab MAT File I/O Interface
Off Topic: I have a limited fortran 90 interface to my Matlab MAT File I/O library in C. I left most of it in C for now because the decompression with the zlib library needs to be in C anyways (Not to mention random file access is easier from what I've seen). I would appreciate comments/suggestions from more experienced fortran programmers. If anyone is interested, send me an email and I will send the source code. ...

importing fortran unformatted file (with a simple header) into MATLAB
My simulation outputs an unformatted file which has the structure: Basically, ndim,ndim,ndim data(;,:,:) but unformatted (ndim = 256). and data is a 256x256x256 3D matrix. Explicitly, fortran outputs: open(unit=52,file=file1,form="unformatted",status="unknown") write(52) mesh(1),mesh(2),mesh(3) write(52) (((xh(i,j,k,1),i=1,mesh(1)),j=1,mesh(2)), & k=1,mesh(3)) close(52) mesh is an integer. mesh(1) = 256, mesh(2) = 256, mesh(3) = 256. xh is a real*8 256*256*256 matrix. In matlab, I've tried a few things based on: http://www.mathworks.com.au/support/solutions/en/data/1-15RS7/index.html?product=ML&solution=1-15RS7 Best attempt: fid = fopen(varname,'r'); hr1=fread(fid, 1, 'int32'); mesh1=fread(fid, 1, 'int'); mesh2=fread(fid, 1, 'int'); mesh3=fread(fid, 1, 'int'); hr2=fread(fid, 1, 'int32'); hr3=fread(fid, 1, 'int32'); data = fread(fid,256*256*256,'real*8'); hr4=fread(fid, 1, 'int32'); fclose(fid); but it isn't working: data is 256^3 x 1 long and not 256x256x256 3D matrix as I would like. Any ideas? Much appreciated. This worked! I'm stupid. I just needed to use reshape to put it into 256^3 format. mesh_reshape = reshape(mesh,[ndim ndim ndim]) Onwards and upwards. B "Brendan" wrote in message <jn5hqi$8ah$1@newscl01ah.mathworks.com>... > My simulation outputs an unformatted file which has the struct...

How to release a matrix created in matlab inside mex file.
Dear all. I play around huge matrices with data and when I pass one of them to a mex file, I want to be able to release memory associated with it from inside the mex file. Is this possible? For instance, when I do something like this, it violates memory when called from matlab. Cheers, Pete void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { if (nrhs!=1) { mexPrintf(" - insufficient argument list!\n"); return; } mxArray* xVar=(mxArray*)prhs[0]; mxDestroyArray(xVar); return; } ...

Matlab engine with matlab R2010b
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¡ ...

Runaway log file when running matlab -r batch_script.m
I am running MatLab 2010b on Ubuntu Linux. Every time I run my batch script using matlab -r on the Linux command line, the script appears to run to completion, but then (in the log file, after all of the script output) I get the following error: Warning: Connection to the X11 Display Server (:0.0) has been lost. No more graphics windows can no longer be displayed in this session. Graphics Objects can still be printed, and all commands should still work. We recommend that you try to save your current session and exit > In run_sim_output_cbrn at 12 ??? Operation terminated by user during ==> run_sim_output_cbrn at 12 >> Invalid file descriptor Invalid file descriptor Invalid file descriptor Invalid file descriptor Invalid file descriptor etc.... The phrase "Invalid file descriptor" is output continuously until my disk is full (creating an enormous log file). At first I ran the script like this: > nohup matlab -nojvm -r batch_script.m -logfile batch.log & Then I tried it again by putting the matlab command (matlab -nojvm -r batch_script.m -logfile batch.log) in a shell script called run_matlab_batch.cmd and then doing > nohup run_matlab_batch.cmd & In both cases I end up with the same problem (nohup.out and batch.log grow with "Invalid file descriptor" until the disk gets full and the process crashes). Thanks for any help on this one. Aaron Schurger ...

What is the best way to import Excel files, with stock data, into Matlab? I’m using Matlab R2010b (64-bit)
What is the best way to import Excel files, with stock data, into Matlab? I’m using Matlab R2010b (64-bit) I’m trying to import historical prices of stock data. Matlab keeps cutting off the header of each column; it gives me only values. I am thinking that this is a data-type-mixing-issue, or whatever it’s called. I have ‘Dates’ in ColumnA, and ‘MSFT’, ‘PWER’, ‘KO’, and ‘SBUX’, in ColumnB-ColumnE. Basically, if I put the Excel file in my Matlab folder and double-click the file, I see the values in a matrix (no dates and no headers), I hit ‘Next’. Then, I see only one option; one radio button is enabled – ‘Create variable matching preview’. The other two options, ‘Create vectors from each column using column names’ and ‘Create vectors from each row using row names’ – both are greyed out. I’ve seen videos, on YouTube and on the Matlab site, where people import excel data and these options are NOT greyed out. No matter what I do, there options are ALWAYS greyed out. The problem is, when I click ‘Finish’ in my ‘Workspace’ I have a variable named ‘data’ all values in a 575x4 matrix, but I have NO DATES and I have NO HEADERS on the columns. All of this seems to go into another variable, called ‘textdata’; all dates and headers ate in textdata. This is VERY inconvenient. I’m trying to analyze some stock data and I have no headers, so I have no idea which stock is which (I can figure it out, but I think Matlab should do this for me). Also, I have no dates corresponding to ...

matlab file
i need to know how we calculate euclideandistance of a bitstream/codeword based on the channel gain of that particular codeword/bitstream subchannel ...

Shall i use the misrosoft Visual c++ code from a m-file generated from matlab in Visual C++ with out matlab runtime environment
undefined ...

Matlab 2011b hangs 5-6 seconds after running small m-files
Dear all, i did not have this problem with previous Matlab releases. My problem is that since I have the 2011b release every time I run a m-file it hangs 5-6 seconds after all the computation are performed. In those 5-6 seconds I cannot do anything, neither checking workspace or write in the command window or using the editor. I tried to create minimal examples to understand when it does that and it looks that the problem is related with figures. The following code never hangs (I tried 10 times): close all clear all clc a= 1:1:100000; The following code always hangs: close all clear all clc a= 1:1:100000; figure and also the following code always hangs: close all clear all clc a= 1:1:100000; plot(a(1:1000)) This is very annoying. Expecially when you are "debugging" your code or trying different inputs. Any suggestion? thanks Alberto "Alberto " <canestrelli@idra.unipd.it> wrote in message news:jmkcg9$54$1@newscl01ah.mathworks.com... > Dear all, > i did not have this problem with previous Matlab releases. My problem is > that since I have the 2011b release every time I run a m-file it hangs > 5-6 seconds after all the computation are performed. In those 5-6 seconds > I cannot do anything, neither checking workspace or write in the command > window or using the editor. I tried to create minimal examples to > understand when it does that and it looks that the problem is related with &...

Matlab crashes when print from my custom function in c-mex s-function code
I have a c-mex s-function file in which I have written several custom functions. I have no problems printing to output files from most of these custom functions, but the one below continually crashes Matlab whenever I try to print to file from this function. This is odd, because, from what I can see, the syntax below follows that used in all of my other custom functions, so I'm not sure what's going wrong. Can anyone spot the problem with the code below, that causes Matlab to crash when the write-to-file statements are active? (When I comment those lines out, the function runs without crashing, although I suspect that this function is generating the wrong values, which is why I need to view them.) ------------------------------------------------------------------- static void mdlRLgetState(SimStruct *S){ FILE *out1; real_T *Dwork_ShAng = (real_T*) ssGetDWork(S,0); real_T *Dwork_ElbAng = (real_T*) ssGetDWork(S,1); real_T *Dwork_state0 = (real_T*) ssGetDWork(S,48); real_T *Dwork_state1 = (real_T*) ssGetDWork(S,49); /* it also crashes if I declare FILE *out1 here, instead */ out1 = ("AA_mdlRLgetState.log","a"); Dwork_state0[0] = Dwork_ShAng[0]; Dwork_state1[0] = Dwork_ElbAng[0]; fprintf(out1, "Dwork_state0[0] = %f, 1 = %f \n", Dwork_state0[0],Dwork_state1[0]); fclose(out1); } /* mdlRLgetState() function */ ---------...

Can I atomically include files to the ctf file of the Matlab compiler?
Hi, My problem: I've a function myHelperFcn.m which needs myData.mat and myImage.jpg at runtime. I can include the needed files with the -a option of the mcc command, like this: mcc -m myFcn.m –a myData.mat -a myImage.jpg But I'm searching for a mechanism like the function pragma (%#function myCallbackFcn) for non m-files, which atomically includes the needed files to the ctf file. thanks, Martin ...

Problem creating animation output file from Matlab m-file
I have a Matlab m-file that reads in my data and successfully displays to the screen an animation of the data. Now, I’m attempting to generate an animation *output file*, so that I can replay this animation in a portable (e.g. .gif ) format on other non-Matlab PCs. At present, the code that I show below *does* generate an “animation” output file (of several MB in size, where one component frame is several kB). However, the problem seems to be that the output “animation” file just contains hundreds of the same frame (which is the final frame of the entire animation), rather than the correct, individual animation frames. I’ve attempted to follow the example code shown in this Matlab Solutions link: How can I create animated GIF images in Matlab? http://www.mathworks.com/support/solutions/en/data/1-48KECO/?solution=1-48KECO and here is a simplification of my code (I omitted much of my correctly-working animation code, and included the full new animation-file-generating code): ------------------------------------------------------- filename = 'myAnimation.gif'; for i=1:Endval % calculate and plot animation to screen % ... set(plot(x,y,'b',x,y,'bo', xtarget, ytarget, 'rx'),'LineWidth',3); drawnow; % new animation-file-generating code frame = getframe(1); im = frame2im(frame); [imind,cm] = rgb2ind(im,256); imwrite(imind,cm,filename,'gif','WriteMode&...

Why does MATLAB rename my files?
Sometimes, I rename my mfiles in the "Current Folder" window of the MATLAB session. Then, when I click on those files to open them in the editor, MATLAB renames them back to what they were formerly, literally in front of my eyes. I never noticed this prior to R2011b. Is this known behavior? Should this happen? "Matt J " <mattjacREMOVE@THISieee.spam> wrote in message news:jghsm4$154$1@newscl01ah.mathworks.com... > Sometimes, I rename my mfiles in the "Current Folder" window of the MATLAB > session. > Then, when I click on those files to open them in the editor, MATLAB > renames them back to what they were formerly, literally in front of my > eyes. I never noticed this prior to R2011b. > Is this known behavior? Should this happen? Matt- I think it would be appropriate to contact technical support on this issue. They'll be able to find the right people to help track this down. -- Loren http://blogs.mathworks.com/loren/ http://www.mathworks.com/matlabcentral/ On Feb 3, 7:04=A0pm, "Matt J " <mattjacREM...@THISieee.spam> wrote: > Sometimes, I rename my mfiles in the "Current Folder" window of the MATLA= B session. > Then, when I click on those files to open them in the editor, MATLAB rena= mes them back to what they were formerly, literally in front of my eyes. I = never noticed this prior to R2011b. > > Is this known behavior? Should this happen? -------------------...

Contribute to MATLAB Central and Win a MATLAB Jacket
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: > ...

Matlab parallel for loop or Matlab open pool
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! ...

Mex MATLAB issue
I have a simple mex application to compute the fft. I am using 2010b MATLABb, but when i try to compile mex -I/usr/local/include -L/usr/local/lib fftwm.c. I get the following error: Undefined symbols: "_fftw_free_hook", referenced from: _install_fftw_hooks in fftwm.o "_fftw_destroy_plan", referenced from: _destroy_fftw_mex_data in fftwm.o _destroy_fftw_mex_data in fftwm.o "_fftw_malloc_hook", referenced from: _install_fftw_hooks in fftwm.o "_fftw_forget_wisdom", referenced from: _fftw_mex_exit_function in fftwm.o "_fftwnd_destroy_plan", referenced from: _destroy_fftw_mex_data in fftwm.o _destroy_fftw_mex_data in fftwm.o "_fftw_create_plan", referenced from: _initialize_fftw_mex_data in fftwm.o _initialize_fftw_mex_data in fftwm.o "_fftw", referenced from: _mexFunction in fftwm.o _mexFunction in fftwm.o (maybe you meant: _install_fftw_hooks, _destroy_fftw_mex_data , _fftw_mex_free_hook , _fftw_mex_exit_function , _fftw_mex_malloc_hook , _initialize_fftw_mex_data , _compute_fftw_mex_flops , _fftw_mex_flops ) "_fftw_free", referenced from: _destroy_fftw_mex_data in fftwm.o _destroy_fftw_mex_data in fftwm.o "_fftwnd_create_plan", referenced from: _initialize_fftw_mex_data in fftwm.o _initialize_fftw_mex_data in fftwm.o "_fftwnd", referenced f...

Web resources about - Matlab crashes when running fortran mex file - comp.soft-sys.matlab

Lightning Crashes - Wikipedia, the free encyclopedia
" Lightning Crashes " is a song by the rock band Live , from their 1994 album, Throwing Copper . The track wasn't released as a single in the ...

When New York Times website crashes, newspaper turns to Facebook Notes
When The New York Times’ website suffered some downtime Wednesday because of technical issues, the newspaper turned to Facebook Notes to post ...


NEW Car Crash Compilation November 2014 - Car Crashes Weekly #30 - YouTube
The new stupid, horrible and funny car crashes compilation 2014, 27-31 October and 01-03 November. Car crash compilation of Fall. Thirtieth week ...

Facebook crashes in rare global outage
Users in the UAE were unable to access Facebook after it crashed just after midday on Thursday.

Worst Driver of the Day: Old Man Crashes Into Everything In Piggly Wiggly Parking Lot
No, this isn’t footage from “GTA V.” A 92-year-old man named Russell Kerr pulled his minivan out of the parking lot last Friday at a Piggly Wiggly ...

Thief crashes stolen car from West Lakes Shore break-in - AdelaideNow Search Search
TWO cars were stolen in a break-in at West Lakes Shore overnight - one which was later involved in a police pursuit, the other in a crash this ...

Police Minister Bill Byrne compares crashes to terrorism
If terrorists killed as many as crashes, there would be an outcry: Minister.

Ute crashes in to bus stop
It’s been the talk of Howard Springs – a ute abandoned after it was crashed into a bus shelter.

Car crashes into Sydney church during Easter service
A car has driven through a group of parishioners&nbsp;and through the front wall of a church after an Easter service in Sydney's north-west on ...

Resources last updated: 3/30/2016 3:34:08 PM