matlab

How to use summation in MATLAB?

I have a randomly generated vector, say A of length M. Say: A = rand(M,1) And I also have a function, X(k) = sin(2*pi*k). How would I find Y(k) which is summation of A(l)*X(k-l) as l goes from 0 to M? Assume any value of k... But the answer should be summation of all M+1 terms. ...

MATLAB date selection popup calendar for gui

Does anyone know of a method to display a popup date selection calendar in a MATLAB gui? I know the financial toolbox has a uicalendar function, but unfortunately I don't have that toolbox. I have a hunch I'm going to have to use some Java or some other language for this one, which I know nothing about. I'm looking for something simila...

Is it possible for tick marks on an image to be centered around the -edge- of a pixel?

If I make a 4 pixel by 4 pixel image in Matlab using the image() command, it centers the tick marks in the middle of the pixels. I want the tick marks to be centered on the lower left corner of the pixel. Is there some way to do this? ...

Saving html page from MATLAB web browser

Following this question I get a message on the retrieved page that "Your browser does not support JavaScript so some functionality may be missing!" If I open this page with web(url) in MATLAB web browser and accept certificate (once per session), the page opens properly. How can I save the page source from the browser with a script? O...

How to find SIGNAL TO NOISE RATIO of Images in MATLAB?

friends i am doing noise reduction in images. for that i have to compare the original image and the filtered image mathematically.please guide me how to find SNR of images in MATLAB. is there any other mathematical comparison of images available in MATLAB? PLEASE HELP ME AS SOON AS POSSIBLE. ...

Matab - Trace contour line between two different points

Hi, I have a set of points represented as a 2 row by n column matrix. These points make up a connected boundary or edge. I require a function that traces this contour from a start point P1 and stop at an end point P2. It also needs to be able trace the contour in a clockwise or anti-clockwise direction. I was wondering if this can be ac...

What does ~= mean in MATLAB?

I've never seen this operator yet. ...

Can someone explain what the output of fft means in MATLAB?

>> fft([1 4 66]) ans = 71.0000 -34.0000 +53.6936i -34.0000 -53.6936i Can someone explain according the result above? ...

Matlab command to access the last line of each file?

I have 20 text files, and I want to use a matlab loop to get the last line of each file without taking into consideration the other lines. is there any matlab command to solve this problem? ...

Matlab, index from starting location to last index

Say you have an array, data, of unknown length. Is there a shorter method to get elements form a starting index to the end than subdata = data(2:length(data)) ...

How can I measure how long a function runs in Matlab?

I have a Matlab program that is running longer than I'd like it to. Is there built-in way to profile Matlab, similar to how time works in unix? ...

call to matlab function in a python prorgam

Possible Duplicate: Calling MATLAB functions from python Hi I wrote a matlab code (that easily could be implimented as a function) that convert a series of BMPs to avi. I want a python program to call to this program/function. how do I do it? thanks ...

Need help understanding this MATLAB function implementation

http://www.cc.gatech.edu/classes/AY2000/cs7495_fall/participants/sashag/ps3/getchaincode.m offset = N/2; %offset between ajacent pixels I don't understand what the above mean? ...

Launching matlab remotely on windows via ssh? Impossible?

Howdy, I am trying to run matlab remotely on windows via OpenSSH installed with Cygwin, but launching matlab in windows without the GUI seems to be impossible. If i am logged in locally, I can launch matlab -nodesktop -nodisplay -r script, and matlab will launch up a stripped down GUI and do the command. However, this is impossible t...

How can I make XOR work for logical matrix in MATLAB?

>> XOR(X,X) ??? Undefined function or method 'XOR' for input arguments of type 'logical'. Why XOR can't be used for logical matrix? And I tried a more simple example: >> A=[1 0;1 0]; >> B=[1 1;0 0]; >> XOR(A,B) ??? Undefined function or method 'XOR' for input arguments of type 'double'. How can I properly use XOR? ...

What does this MATLAB function do?

function sk=skeleton_finding(x) % calculate distance transform dt=bwdist(~x,'cityblock'); % find the local maximum n=[0 1;-1 0;0 -1;1 0]; sk=dt>0; for i=1:4 sk=sk&(dt>=circshift(dt,n(i,:))); end Can someone illustrate with an intuitive image that applies this transform? ...

How do concatenation and indexing differ for cells and arrays in MATLAB?

I am a little confused about the usage of cells and arrays in MATLAB and would like some clarification on a few points. Here are my observations: An array can dynamically adjust its own memory to allow for a dynamic number of elements, while cells seem to not act in the same way: a=[]; a=[a 1]; b={}; b={b 1}; Several elements can be ...

Matlab - Propagate points orthogonally on to the edge of shape boundaries

Hi I have a set of points which I want to propagate on to the edge of shape boundary defined by a binary image. The shape boundary is defined by a 1px wide white edge. I have the coordinates of these points stored in a 2 row by n column matrix. The shape forms a concave boundary with no holes within itself made of around 2500 points. ...

How to get features of separate disconnected closed curves(contour) using fourier transform?

FT can only be used to select feature for a single closed curve, how can I use it for several separate disconnected closed curves as a whole? A solution in MATLAB will be the best though not mandatory. ...

Load any file type into matlab

I have a matlab GUI....I'd like to load ANY file type(doc,txt,dat,xls) into matlab as a matrix through the GUI...I'd appreciate any help I can get!! ...