Hey friends, i am working on simulation of power system using matlab. for that i have written codes for generation side and line side separately. Now i want to use the result of generation file to line file....so how can i use the result of one file to another.... eg i have gen.m file from that i can get hourly gen data....now i want to compare that data to line.....and line modelling is done in separate file line.m so i want to call result of gen.m file to line.m file..... waiting for ur valuable suggestion thanks ...

Hi Everyone, I have an high level problem (I believe) that I will try to explain; My development platform is: 64bit Ubuntu 12.04 LTS and MATLAB 2013b with GCC/G++-4.7 library I am trying to create a MATLAB interface by coding a MexFunction using gigantic C++ library previously developed. For the tests I previously build and MexFunction only using and parsing XML files as inputs where paths are hardly defined within the function (for simplification and debugging), and I am not passing any input and output with *plhs and *prhs yet. My code includes MexFunction can be compiled without any problem, but when I try to run it, It is crashing MATLAB so I need to end MATLAB and relaunch. The problem occurs in the following line (probably this information is irrelevant) oca_parser::OcaParser* oca ( new oca_parser::OcaParser( ( inpath / operational_context_name ).native_file_string() , oca_parser::AIXM_FORMAT ) ); - Basically this code is parsing a XML file and writing in a class - this function is completely working outside of the MATLAB in existing C++ test code - For debugging I have used try {...} catch {...} and sometimes (if I had newly restarted OS and launched fresh MATLAB) I have got std::bad_alloc error. - Since it seems like running out of memory problem, I have create very small XML file for input -- so error has been disappeared! But of course I need to use whole XML files and their size are not bigger than ~180 KB. Sorry for the lon...

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

Hi all, I want to ask three questions regarding Fortran and Matlab interface. The two tools I am using are: Intel Visual Fortran 10.1 and Matlab 2006a. Q1. What is the best converter to convert Matlab code into Fortran code with readability? My understanding is that Fortran and Matlab are both vectorized and they should be pretty similar and such converter should do a good job. Q2. Is there a wizard for Intel Visual Fortran under MS Visual Studio.Net 2003 or Visual Studio.Net 2005 to set up environments for building mex dll file for Matlab on Windows XP? There is such a wizard tool for VC/C++, which is very convenient, just create a MEX project in Visual Studio and the compiled the result will be a mex dll for use in Matlab. I hope there is a similar tool for Fortran? Q3. Is there a tool to convert the Matlab code into Fortran with readability and then automatically make itself a mex dll? Thanks a lot! On Jul 6, 9:49 pm, "Linus Utopia" <linus_uto...@gmail.com> wrote: > Hi all, > > I want to ask three questions regarding Fortran and Matlab interface. The > two tools I am using are: Intel Visual Fortran 10.1 and Matlab 2006a. > > Q1. What is the best converter to convert Matlab code into Fortran code with > readability? My understanding is that Fortran and Matlab are both vectorized > and they should be pretty similar and such converter should do a good job. > > Q2. Is there a wizard for Intel Visual Fortran under ...

Hello, I have written a mex gateway function to a C++ class. If I compile this mex function on 32Bit windows using R2008a I have no problems. If I compile and run on Matlab R2011a running 64bit Scientific Linux (a version of Red Hat Enterprize Linux) matlab exits with a segfault when the mexfunction is called, although it appears to run about halfway through the program. The C++ class can be compiled and run (with a main function) outside of Matlab on both platforms with no errors. I am using Microsoft Visual C++ Express Edition on the windows machine, and gcc 4.4.5 on the Linux machine. ...

Hello I've just started using a program, and i need to import data to this program. There are other options but I prefer to import it from matlab...but this program only support matlab 4 version. I want to convert it my file but i son't know why....I've proved with save as..but i had no chance. What i have to do?Someone can help me? Thank you very much! Bye!! Michael wrote: > Hello I've just started using a program, and i need to import data to > this program. There are other options but I prefer to import it from > matlab...but this program only support matlab 4 v...

I have a Matlab simulation that I run at work that takes 4+ hours. When I run it from home thru a VPN to my employer it's about 20x quicker! I'm trying to figure out what the issue could be. The loading on the computer is about the same at work and at home. It has to be something related to our computer network at work vs. my network at home, but I'm not sure where to look. Any ideas? On 10-12-02 01:24 PM, Kevin wrote: > I have a Matlab simulation that I run at work that takes 4+ hours. When > I run it from home thru a VPN to my employer it's about 20x quick...

undefined ...

I want to create a mex file to be called by matlab. I have done all the basic stuff and got the examples to work. But now I want to create a much more ellaborate external c program. But all my calles to things like "strcta" or "CreateFile" which works well in MSVC6.0 fials to compile and link here. How do I do this? Thanks Henry henry terhani wrote: > I want to create a mex file to be called by matlab. I have done all > the basic stuff and got the examples to work. But now I want to > create a much more ellaborate external c program. But all my calles > to thin...

undefined ...

Hello all, 1. I am trying to read large binary data files (~1 GB size), process the information and dump the outputs (which are also of incredibly big size) to MATLAB workspace. I wrote a mex file to do the same (so that I have faster program execution speeds). 2. The C mex file that I wrote works very well and can dump all the variables to MATLAB workspace for smaller size files. However for larger binary files, the MATLAB gives OUT OF MEMORY error as the size of the variable space is simply too big. 3. Often I am not interested in all portions of the file and don't need all the variab...

I am creating an environment to test mex files which will replace exisiting m files in an extensive matlab simulation. As I do this I want to be able to check that the results from the new mex function are the same as the result from the existing m file function. Is there a slick way to force Matlab to call the m file function when a mex function of the same name exists? Ideally I would want to do something like: a = my_function(x,y,z) % calls the mex version b = my_function(x,y,z) % calls the m file version error = abs(a-b); Any suggestions that don't require renaming files? Thanks a l...

Hello I am trying to compile a project (to have a mex-file at the end) with Codewarrior9 and Matlab7 (on a Mac). It works fine with Matlab5 and Codewarrior8, but not now. One of my problem is that Matlab5 was put in the project (I don't know how, it's not my project). Now I want to swap to Matlab7, but when I want to add it, Matlab7 appears as a directory (not in the Mac Finder though). The moderator of CW adviced me to check the extension of Matlab7 and add it to the mapping files settings of my project. However, I have no idea of what Matlab's File Type is. Also, CW asks me for ...

Hello, I have c-function interfaced via mex. Inside this function several file streams are opened, content is written using fprintf() and the files are closed. Some file descriptors are defined within the function scope, opened there, written there and closed there. With these files all is fine. But one file descriptor is declared globally, opened in one function, written to in another and finally closed in the function, where it has been opened. The problem with this file is, that after a successful call of the mex function, the file size is 0 bytes. The file is opened with "w" ...

Hi everybody, I know how to make a Mex file for a simple CPP file. But when I want to compile a more complicated CPP program with included "header files" I keep getting strange errors. I should mention that when I was compiling the files directly in visual studio c++, it was okay and it successfully compiled. The header files that results in error are from a Phantom Omni Haptic device library and are correct. I also should mention that I set the correct compiler using mex -setup in Matlab. Here is some part of the included header file and coresponding errors I got: program: ((Included Header file name : hdDevices.h)) Line 25) #include <HD/hdExport.h> Line 26) #include <HD/hdCompilerConfig.h> Line 27) #include <HD/hdDefines.h> Line 28) Line 29) #ifdef __cplusplus Line 30) extern "C" { Line 31) #endif Line 32) Line 33) /* Initialize the device. Must be called before any use of the device. Line 34) Makes the device current. */ Line 35) HDAPI HHD HDAPIENTRY hdInitDevice(HDstring pConfigName); Line 36) Line 37) /* Makes the specified device current: all future calls will be performed on Line 38) this device. Requires a valid device id from an initialized device. */ Line 39) HDAPI void HDAPIENTRY hdMakeCurrentDevice(HHD hHD); Line 40) Errors ----> C:\Program Files\MATLAB\R2012b\simulink\include\HD/hdDevice.h(35) : error C2146: syntax error : missing ';' before identifier 'HHD'...

I want to create the mex file from external fortran file (file.for). I use compaq visual fortran 6.6a and matlab v13. Pleas help me. I have still the same problem. ------------------------------------------------------ >> mex -setup Please choose your compiler for building external interface (MEX) files: Would you like mex to locate installed compilers [y]/n? y Select a compiler: [1] Compaq Visual Fortran version 6.6 in C:\Program Files\Microsoft Visual Studio [2] Lcc C version 2.4 in C:\MATLAB6P5\sys\lcc [3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Stu...

Hi there I want to save my data into data file in Matlab v7 (R14). How can I save it in a manner such that it is also loadable in Matlab v6.5 (R13) ? As at the moment, Matlab v6.5 interprets a Matlab v7 saved data file as a corrupt file. Thanks in advance, rehan Rehan Ahmad wrote: > > > Hi there > > I want to save my data into data file in Matlab v7 (R14). How can I > save it in a manner such that it is also loadable in Matlab v6.5 > (R13) ? As at the moment, Matlab v6.5 interprets a Matlab v7 saved > data file as a corrupt file. > > Thanks in advance, > reh...

Hi, I've just installed Matlab 7 and it's incredibly slow when starting up and also when closing. Once the Matlab program window opens, it looks like as if it has started but it says "Initilizing..." in the Status bar at the bottom and the Start button is disabled. Basically you can't do anything. I never had such problems with Matlab 6. Don't have any virus program running either. Is there any setting I need to adjust to prevent this from happening? Cos it takes nearly 2-3 mins just to complete initialization!! I tried installing it on two notebooks and they both ...

Dear all, I am using matlab R2010b, 32bit version to 1) query a device and 2)store those results to hard disk. That device, actually is a measurement devices, every one second "feeds" matlab with 256kbytes of data (32.000 number of double precision). I am appending those measurements to a file and for reducing the extra burden I write those numbers fwrite(fileID, DataToWriteToFile, 'float32') as float32. After few days the size of the file increases in size (i.e 20Gb after 3 days of non stop getting n storing measurements into a file) and it looks like that the ma...

I have a mex file, i deallocate memory for every thing i use, apart from a waveform which receive.I allocate space for it through mxCalloc and doesnot set if free. the matlab call is [a,b]=my_func(c,d) the mex file compiles smoothly and the first time i call the function in matlab, it works smoothly, but when i call the function again , the workspace goes blank, though if i type 'a' in command window, i can see the contents of a, and i can plot the contents of a too, now if i plot again, the matlab simply crashes (segment violation), it says to save ur work and restart matlab, ...

I see some very useful files and commands at Matlab central, and wonder why Mathworks does not add these to the official Matlab release? This will make using these files/commands easier, so that, for example, when sending an .m file to someone, they do not have to go download some additional files from matlab central first to the code. Just for an example, there is the GUI layout manager toolbox http://www.mathworks.com/matlabcentral/fileexchange/27758-gui-layout-toolbox And the factorize() and inverse() commands in http://www.mathworks.com/matlabcentral/fileexchange/24119 ...

Hello, Is there any limitation to run Matlab from Matlab, as a system command, on Linux platforms ? I tried to start Matlab, both using the ! syntax (!matlab&) or the system command (system('matlab&')), the Matlab splash screen appears, but the new Matlab session closes rapidly . When I do the same with a script of mine (system('matlab -r "myscript"&')), my script is being executed, but Matlab finally crashes . If I remove the &, it works well, but the first Matlab session is blocked till I close the second one . I run Matlab on a Linux 64bits platform . Thanks in advance, Nicolas On 10-12-03 01:22 AM, Nicolas wrote: > Is there any limitation to run Matlab from Matlab, as a system command, > on Linux platforms ? > I tried to start Matlab, both using the ! syntax (!matlab&) or the > system command (system('matlab&')), the Matlab splash screen appears, > but the new Matlab session closes rapidly . > When I do the same with a script of mine (system('matlab -r > "myscript"&')), my script is being executed, but Matlab finally crashes . > If I remove the &, it works well, but the first Matlab session is > blocked till I close the second one . > I run Matlab on a Linux 64bits platform . It appears there is a parsing problem in the script that invokes Matlab. Here's an example of what I had to do to get around it: !matlab -r \""...

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

I often translate the most computationally expensive routines in C++ using IT++ library, then I call these routines from Matlab as mex files. IT++ library (https://sourceforge.net/apps/wordpress/itpp/) uses blas/acml functions to handle matrix/vector operations and is entirely written in C++. The problem seems to be that Matlab does not handle properly calls to routines from blas/acml libraries. Both, Matlab and IT++ use these libraries, but they are stored in different places. Short example: buf = intrinsic_coded(i*nb_outputs,(i+1)*nb_outputs-1); The line above is executed from a C++ prog...

Undocumented, unsupported and hidden features in Matlab

... 23°21′N 90°42.5′E / 23.35°N 90.7083°E / 23.35; 90.7083 Coordinates : 23°21′N 90°42.5′E / 23.35°N 90.7083°E / 23.35; 90.7083 Matlab ...

The MathWorks - Developers of MATLAB, Simulink and Stateflow. Offers products for data analysis, visualization, application development, simulation, ...

Read reviews, compare customer ratings, see screenshots, and learn more about MATLAB Mobile. Download MATLAB Mobile and enjoy it on your iPhone, ...

In the aftermath of an earthquake, every second counts for disaster victims. Imagine a system that can locate people quickly and help first responders ...

What prompted the development of MATLAB?

If you are trying to compile Matlab into .Net framework, you might encounter this message, even though you have the .Net framework installed ...

Matlab, one of the world's most widely used products for algorithmic development, has long occupied its own niche far removed from EDA and hardware ...

dmtcp - DMTCP: Distributed MultiThreaded CheckPointing matlab -nodisplay -r "parpool('local',4); parfor i=1:10, pause(1); fprintf('%i ',i); end; ...

... so he focused on studying the methodology and the tools available for analyzing 433MHz RF transmission. He describes the process of using MATLAB ...

Resources last updated: 3/13/2016 2:38:19 AM