Answered
How can I remove noisy data from my plots
X(X>some_noise_threshold) = []; removes stuff greater than the threshold you set for noise. Show us a small set of sample ...

15 years ago | 0

Answered
Breakpoints
Why not just set one on the first line and step through it? doc dbstop doc dbstep

15 years ago | 0

Answered
Publishing an M-file with input and uigetfile commands
I would recommend saving a second copy of the mfile you wish to publish. In this mfile, comment out the input/uigetfile command...

15 years ago | 0

Answered
Store fllepath in variable
Sure: fp = 'C:\Users\ecorbett\Documents\MATLAB\Labelers\fred\' %added extra \ csvwrite([fp 'my_example_csv.csv'], magic(5)...

15 years ago | 1

Answered
stimulus presentation
Sounds like you want a |while/for| loop with a |pause| doc while doc for doc pause or a |timer| function. doc timer I ...

15 years ago | 0

Answered
Index of zero error
indx=find(y(:,3)>0); when there are no |y(:,3)>0| indx is empty and thus its 'end' ( |indx(end)|) is |indx(0)| which doesn'...

15 years ago | 0

| accepted

Answered
How to use offset function of excel vba in Matlab coding environment????
Matlab indexing starts at 1 not 0. first_m = objSheet.Range('A:Z').Find('month').offset(1,1).Address;

15 years ago | 0

| accepted

Answered
How to create an empty array of structs?
st = 1:10; for ii = 1:10 array(ii).st = st(ii); end You need to set the value to a field of the struct since tha...

15 years ago | 1

Answered
integrating in a for loop
You probably want to do an element-by-element power (x.^blah). You're trying to do a matrix power, hence the error in |mpower|....

15 years ago | 0

Answered
how to amke 2D map in matlab
Do you have components of velocity or just magnitudes? Here are a few tools you may be looking for: doc quiver doc sc...

15 years ago | 0

Answered
Normalized Intensity Fluctuation of Series of Images
Do you mean you want something like Brett Shoelson's <http://www.mathworks.com/matlabcentral/fileexchange/29764-thresholdlocally...

15 years ago | 0

Answered
matlab code for vehicle routing problem
<http://www.mathworks.com/matlabcentral/fileexchange/?term=tabu FEX:tabu> The FEX doesn't turn anything up so unless you can ...

15 years ago | 1

| accepted

Answered
GUIDE help
You put the commands in the callback buttons to the buttons which should've been automatically generated by guide and in the *.m...

15 years ago | 0

Answered
Programming error?
In reply to your deleted answer from yesterday, your error was, as Jan suggested, that you were confusing x/y with row/col. For...

15 years ago | 0

| accepted

Answered
Almost done, one bug left!
First off, tell us what line the error is on. if ceil(data(j+i+1,:)) ~= floor(data(j+i+1,:)) I would guess it's on this line...

15 years ago | 0

Answered
unsolved function
I've never heard of those functions before, nor are they on the file exchange.

15 years ago | 0

Answered
Floor function for int8
A = int8(magic(10)); B = int8(5); idx = (mod(A,B)>(B/2)); %elements that need to be reduced. C = A./B; C(idx) = C(idx)-...

15 years ago | 0

Answered
imrect
Look at the first example in the doc imrect documentation file. A few small changes to the callback function and you'll...

15 years ago | 0

Answered
How do I apply a sliding window on an image?
doc conv2 doc imfilter doc blkproc doc blockproc a few sliding window tools... Please be more specific if you wan...

15 years ago | 1

Answered
'dec2bin' produce error when converting rounded float number
icolour = imread('peppers.png'); icolour_s = imresize(icolour,[200 200]); igray = rgb2gray(icolour_s); igray = double(ig...

15 years ago | 0

Answered
Vector Manipulation
row_index = [1;33;67]; %row indices row_index = unique(cumsum(horzcat(row_index,ones(size(row_index,1),30)),2)) I threw the u...

15 years ago | 0

| accepted

Answered
About vectors
x = sort(x,'descend'); %descend sort it x = x(1:3,:); %keep first three rows

15 years ago | 1

| accepted

Answered
About Watershed
Any chance you're just not zoomed in enough?

15 years ago | 0

| accepted

Answered
Select neighbours of a vector efficiently
I would probably try to do it with a convolution. A 'valid' one with a : kernel = ([1;1;0;1;1]./4); %a is a column vector (e...

15 years ago | 0

Answered
How do I export the results of multiple 'runs' of my code to text without overwriting the previous run?
What are you using to write the data? If you look at doc fopen You can see the 'a' option for append.

15 years ago | 0

Answered
Matrix n x n input
n = some_number; matrix = rand(n) matrix = magic(n) matrix = zeros(n) Please be more specific as to what you want.

15 years ago | 0

Answered
Polyfit works in command window, but returns incorrect values in M-File
*EDIT* Both look good to me... dCDA_model = polyfit(ZMag,dCDA,2); %your new data sCDA_model = polyfit(ZMag,sCDA,2); su...

15 years ago | 0

Answered
periodogram example code
You wrote a script called 'periodogram.m' located at _C:\Users\Currys\Documents\MATLAB\periodogram.m._ It's trying to call your...

15 years ago | 0

| accepted

Answered
please the 'for' loop in the following program
b_p = ones(size(b)); b_p(~b) = -1; bw = [kron(b_p,ones(1,100)) b_p(end)]; creates the same thing you have for b_p, bw...

15 years ago | 0

Answered
candle function problem
Do you really expect to be able to visualize on a small scale 600 different points? It seems like a lot to me and would not b...

15 years ago | 0

Load more