Unit-testing framework for MATLAB
What are the unit-testing frameworks for MATLAB out there, and how do they compare? How should I choose one for our project? What are their pros and cons? ...
What are the unit-testing frameworks for MATLAB out there, and how do they compare? How should I choose one for our project? What are their pros and cons? ...
I've got a large (4000 values) set of unsorted, normally distributed points. I'm taking each of these data points into bins whose limits are in the BinLimit array. Then I'm tabulating the number of values in each bin. X is the array of raw data, and N is the number of data points. The number of bins desired (TotalBins) is specified by t...
Here is the scenario: using a spectrum analyzer i have the input values and the output values. the number of samples is 32000 and the sampling rate is 2000 samples/sec, and the input is a sine wave of 50 hz, the input is current and the output is pressure in psi. How do i calculate the frequency response from this data using MATLAB, usi...
Hi, I am a newbie to Matlab .I was trying to do some image matching.Image X is bigger and Image Y is smaller.Our aim is to find all possible overlaps of y with x and then compute sum of square differences for RGB at each such overlap(ie x^2+y^2+z^2).So I find a location (i,j) in bigger image from where we pick a tile and match . To be p...
problem Statement : I have to make a table consists of ( i,j,s(i,j)) where i and j are Keyframes or images and S(i,j) is similarity measure value between those images. how to find similarity value between two images? Can anyone please tell me how to find this Using sum of squared distances of pixels using Matlab ? My problem cont...
I am doing matrix operations on large matrices in my C++ program. I need to verify the results that I get, I used to use WolframAlpha for the task up until now. But my inputs are very large now, and the web interface does NOT accept such large values (textfield is limited). I am looking for a better solution to quickly cross-check/do ma...
I am about to present my work that I have created in MATLAB, but I am having trouble manipulating my data into a presentable form using the plot function. My code looks like this: [inputname, pathname] = uigetfile('*.wav', 'Select WAV-file'); thumb1 = inputname; %# Get filename information fprintf('\n%s is being turned i...
Hi. I want to speedup some matlab code involving a loop. A common solution is to code the loop in C and call it from matlab. However, I was wondering if I can get similar benefits from implementing the loop in Java instead - perhaps the just-in-time compilation makes it faster? ...
How do you get started with MATLAB? Hints/Links to some must read/watch tutorials/screen-casts would be great! Update: I know C/C++/Java ...
I have some large floating point numbers such as 1243564832.75 in Matlab. Matlab changes the format to 1.2435e09 or if I use long format: 1.2435648e09 or something like that. Is there any way I can display the numbers in their non-engineering format (1243564832.75)? Thanks, Shadi. ...
Hello all, I'm debugging a matlab script that takes ~10 minutes to run. Towards the end of the script I do some i/o and simple calculations with my results, and I keep running into errors. Is there a way to start matlab from a certain sport in a script after it exits with an error--the data is still in the workspace so I could just comm...
I would like to plot discrete values in MATLAB like this: stairs() and stem() make similar plots but can I configure one of them to look like the image above? ...
I have an array, let's say A = 1 2 3 4 5 6 7 8 9 2 3 4 3 4 5 1 6 8 I took a point from 3rd column, let's say p=9. Now I want a new array that gives me all values after 9 and discards values before 9. For example: ans = 7 8 9 2 3 ...
Hello! I looking for block in Simulink to make some recursion, for example: I want calculate A_(k+1) = 2 * A_(k) , where k = 1,2,3,4 and A_(1) = 3. How to make something like this ? I only find initial values in integrator :/ ...
I'm trying to create a matrix M satisfying: M(i,j) = f(i,j) for some f. I can do elementwise initialization through say M = zeros(m,n) then looping. For example (in Octave): M = zeros(m,n) for i = 1 : m for j = 1 : n m(i, j) = (i+j)/2; endfor endfor But AFAIK loops are not the optimal way to go with MATLAB. Any hints? ...
Here's a part of my code where I am entering a name of the .mat file, which is located in the same folder as my code. However it does not identify the file name and gives an error: "??? Error using ==> load Unable to read file 'q_5wells_yearly_CMG.mat': No such file or directory." q_MethodType=input('Do you want to use q from "CMG", ...
Hi, My program produces small figures during the command cycle. Is there a way to just save these figures to then combine them in one figure later? So then how do you load them into a single figure later? Best, ...
Hi, I'm writing a Java application for real-time image processing. I'd like to be able to validate the algorithms used or present data I acquire in the Java app with Matlab afterwards. In the Java app I'm using java.awt.image.BufferedImage's to process data internally. The program usually runs about 1-2 minutes and grabs data at 25Hz, 1...
Let's say I've got a vector a = [1 2 4]. I want it converted into a vector which looks like this b = [1 2 0 4], i.e. each number is placed into a correct position and since 3 is not included into the vector a, it is replaced by 0 in vector b. This can be done the following way: a = [1 2 4] b = zeros(1, size(a, 2)); b(1, a) = a; I can'...
How do I flip a color image (RGB) in MATLAB? The fliplr does not seem to work without losing the color contents, as it only deals with 2D. As well, the imrotate may not rotate color images. ...