matlab

How to open DBase files (.DBF) in Matlab?

I've googled and searched through Matlab Central, but cannot find any way to open DBF files directly in Matlab. There are some references to DBFREAD function in TMW File Exchange, but it's not available anymore. Is it really a problem? I do have Database toolbox, but could not find dbf support there. I don't want to use Excel or othe...

Trying to know why the OpenMP code does not parallelise

I just started learning how to use OpenMP. I am trying to figure out why the following code does not run in parallel with Visual Studio 2008. It compiles and runs fine. However it uses only one core on my quad core machine. This is part of the code that I am trying to port to a MATLAB mex function. Any pointer is appreciated. #pragma om...

Matlab Simulink scope log or saved data

I have a simulink model with a scope output that I want to observe. However, I want the data shown on the previous simulation while being stopped to be continuously shown on the scope window, or saved to a file somewhere. Is there any easy way to achieve this? Thanks in advance. ...

Matlab 2009b & .NET

I am having all sort of trouble with [FlagsAttribute] enums in Matlab. It appears there is no way to pass a combination of values as a parameter to .NET. For example, BindingFlags.Public|BindingFlags.Instance, once you combine these together in Matlab they become of an internal type and cannot be cast back to BindingFlags. Things like ...

Am I making a mistake in this matlab code?

Please check the code and let me know if I am making any mistakes. Also I need to apply slow and fast rayleigh fading in this model. The rcd signal is R = SAB + N where R,S,A,B are matrices The matlab code is given below : close all clear all; clc; warning off all K = 27; %No. of users Navg = 1e3; %No. of repititions snr = 5:1...

VGA 15 pin port data read and write using Matlab

I am using compaq presario cq40 laptop with windows seven ultimate(32-bit OS). I would like to access the 15 pin VGA port using Matlab (preferrably using the Data Acquisition Toolbox). Do I require extra drivers or should download anything from Mathworks.com ?? I have already developed a program for sending digital signal through parall...

Simple MATLAB/Octave simulation

This should be a very simple question for anyone who has some experience in this area, but I'm still new to this. I have the following system (or here is an image with better resolution): Given the following input: u = min(2 - t/7.5, 2*(mod(t, 2) < 1)); I need to plot the output of system y. I am describing the system with the fo...

matlab search path

Hi, I have some questions regarding the MATLAB Search Path. (1) Current directory is in the search paths, but why it is not in the output of "path"? Where can I find the complete search paths? (2) what are all possible ways to add search paths? (3) Considering all possible ways to add search paths (e.g. pathdef.m, startup.m, MATLABPA...

How to run matlab codes from java end.

Hi, I am facing problem in running matlab codes from JAVA. If you know something on this, could u please help me out. Thanks. Deepak ...

Is Matlab faster than Python?

I want to compute magnetic fields of some conductors using the biot-savart-law and I want to use a 1000x1000x1000 matrix. Before I use Matlab, but now I want to use Python. Is Python slower than Matlab? How can I make Python faster? EDIT: Maybe the best way is to compute the big array with c/c++ and then transfering them to python. I w...

Matlab: Magnetic fields calculated with biot-savarts-law

Hello! This is the code for the computation of magnetic fields using the biot-savart-law. I hope to get some tipps for the optimization of this code. Regrettably I use german language :( I never will do this again. :) tic clear all; clc; clf skalierungsfaktor = 10^-6; % vom m-Bereich zum mm-Bereich wg. T = Vs / m^2 I = 1; % in A konstan...

Merging two figures in Matlab

I am currently running a Matlab script (below) which produces four seperate graphs. I want to combine two of these graphs so that the are displayed simultaneously. The graphs I wish to combine i referred to as FIGURE 2 and FIGURE 4 in the below script. The only input to the script is a txt file with 6 columns: x coordinates, y-coordinat...

Could asp.net unite autocad and mathcad or matlab system?

Needs that autocad uses value from mathcad or matlab? Could I use for it asp.net? ...

FA: Choosing Rotation matrix, based on "Simple Structure Criteria"

One of the most important issues in using factor analysis is its interpretation. Factor analysis often uses factor rotation to enhance its interpretation. After a satisfactory rotation, the rotated factor loading matrix L' will have the same ability to represent the correlation matrix and it can be used as the factor loading matrix, inst...

running script stop in the middle

Hi, I have a script doing some computation and save some invisible plots into image files inside a for-loop on a linux server. When I run the script, it usually get stuck in somewhere in the middle. I am not sure where exactly it stopped, but I can know at which iteration of the for-loop it stops by print-out. if I rerun it from the ite...

legend for group of lines

Hi, I like to plot two groups of lines in the same plot. Each group has two lines with same color and I have to draw them in the order of one group after another group. I try to show legend for groups only not for lines. How can I do this? Here is a simplification of my wrong code: plot(x1, y1, color1); hold on; plot(x2, y2, color1); h...

matlab - creating a single dimensional array from two dimensional parts

hi i have the following situation h = [0,1,1,1; 0,0,0,0; 1,1,1,1]; i'll check incoming values which can range between 0 and rowsize of h, i.e. in this case 2,. so my options are 0,1,2. now i want to create a single dimensional array (let's name it j) as follows whenever the incoming value is 0 j = [0,1,1...

matlab - print subarray of two dimensional array

hi let's assume i have the following in matlab h = [0,0,0,1; 1,1,1,1]; now how can i print all the values of the first subarray, i.e. 0,0,0,1 or for example the second subarray 1,1,1,1. thanks ! ...

Mapping 2 vectors - help to vectorize

Working in Matlab I have 2 vectors of x coordinate with different length. For example: xm = [15 20 24 25 26 35 81 84 93]; xn = [14 22 26 51 55 59 70 75 89 96]; I need to map xm to xn, or in other words to find which coordinates in xn are closest to xm. So if I have values associated with those coordinates, I can use this map as index ...

Can I unite matlab and autocad into one system

I need unite in one automatic system. Which application should be used for that if that possible ...