Answered
Subscripted assignment dimension mismatch.
You can use Im = blkproc(I, [3 3], 'mean2');

11 years ago | 0

Answered
finding moving direction of object?
If the object has position (x1, y2) at time t and (x2, y2) at time t+1, it moved in the direction (x2 - x1, y2 -y1).

11 years ago | 0

| accepted

Answered
Error in findpeaks when trying to find the x corodinate
[pks,locs] = findpeaks(PeakSig); plot(x, PeakSig) text(x(locs)+.02,pks,num2str((1:numel(pks))')) Sorted according to hei...

11 years ago | 0

| accepted

Answered
read a formated text
i1 = findstr(S, '<content'); i2 = findstr(S, '/>'); i2 = i2(find(i2>i1(1), 1, 'first'):end) + 1; for i=1:numel(i1) R...

11 years ago | 0

Answered
How to return the dimension of image if I had already add padding before ?
W = W(2:end-1, 2:end-1);

11 years ago | 1

| accepted

Answered
Why does the Bode function behaves differently in a subplot?
This litte script works for me; maybe something unexpected is going on in your bodemag function? function plotdata(s) ...

11 years ago | 0

Answered
how we can fill just sector of a circle?
alpha = linspace(10, 50)/180*pi; patch([0 cos(alpha) 0], [0 sin(alpha) 0], 'r')

11 years ago | 2

| accepted

Answered
Nested For Loops Array Indexing
If you don't need the various D values for the different times, you can use for time ... for i ... for j ... ...

11 years ago | 0

Answered
How to Customize Data Cursor for scatter plot
http://de.mathworks.com/help/matlab/creating_plots/data-cursor-displaying-data-values-interactively.html *Customizing Data Cu...

11 years ago | 0

| accepted

Answered
Organize .txt file data
fid = fopen('organizacoes.txt'); line = fgets(fid); i = 1; while line ~= -1 T{i} = line(1:end-2); % end-2 to get rid of LF...

11 years ago | 1

Answered
how can I plot an array by array?
val = 7e-5:1e-5:3e-4; for i=1:length(val), x(i) = 1 + 2*val(i); y(i) = 3 + val(i);end plot(x,y)

11 years ago | 0

| accepted

Answered
how to insert RGB percentage colors in a vector?
To get, e.g,, 10 different colors, you can define your colormap like cm = jet(10); or using http://www.mathworks.com/mat...

11 years ago | 0

Answered
Legible error on multiple points for same x-value
Well, you have good data, that's what your overlapping errorbars show. And that's why you show them. If all your data would be l...

11 years ago | 0

Answered
Distance from point to plane
This is a math question rather than a Matlab question. First convert your plane from 3-point-form to Hessian normal form http://...

11 years ago | 0

Answered
I can Not include my condition
if Le(i)/Ep(i,6) > 200 % do something end

11 years ago | 0

| accepted

Answered
extract quiver magnitude of an image
To double the length of the arrows: quiver(x,y,2*gx,2*gy)

11 years ago | 0

Answered
Plotting with image together with scatter plot
scatter(handles.axes1,5,6) just plots a single points at (5,6). Maybe that's the error. To scatter 100 points all over the image...

11 years ago | 0

Answered
Storing output of for loop on a matrix
discount(:,:,t) = CF\ones(30,1);

11 years ago | 0

| accepted

Answered
Warning: Out of range or non-integer values truncated during conversion to character.
You use a string as index, that's probably wrong DataSetU(num2str(mm))

11 years ago | 1

| accepted

Answered
How can I make sound randomly occur during 10 second presentation of other stimulus?
Create a random number between 0 and 9, wait for that time and then play the sound.

11 years ago | 0

Answered
remove first s and last t rows of a matrix containing NaN, leave lows in the middle containing NaN.
There might be smarter solutions to figure out the indices of leading and trailing 1's in nanflag, but this solution works: ...

11 years ago | 0

| accepted

Answered
Ensuring same bins in image histogram
Use hist/histc with a second vector argument to specify bin centers/edges N = HIST(Y,X), where X is a vector, returns the d...

11 years ago | 0

Answered
How to aggregate rows in a matrix
[day, ~, subs] = unique(m(:, 1:3), 'rows'); zones_colind = [7:10]; for i = 1:size(day, 1) m_day(i,:) = [day(i, :) sum(m...

11 years ago | 0

Answered
How to replace the data in one column with another column
D1 = dlmread('example1.txt'); D2 = dlmread('example2.txt'); M = [D1(:, 1:2) D2];

11 years ago | 0

Answered
Retrieve the good measurement from multiple samples
Hi Simon. The sensor always underestimates the true value. You can correct that my sorting the measurements and omit the N lowes...

11 years ago | 0

| accepted

Answered
??? Too many input arguments Error
Please double check that your function is called with 17 inputs. Such a large number of inputs is error prone. Try do define...

11 years ago | 0

Answered
Coloring a line of intersection line of circles
line([x1 x2], [y1 y2], 'Color', 'r')

11 years ago | 0

Answered
How can i get the divergence of vector field of a gray scale image??
In this example the vector field is computed as the gradient in x and y direction: function D = imdiv(I) Ix = diff([I I(:, ...

11 years ago | 0

| accepted

Answered
Compute Average Matrix from Cell Array of Matrices
The idea is to create a 124x21xN matrix 'Anew' with missing values filled with NaNs, and then take the nanmean along the third d...

11 years ago | 1

Load more