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

más de 11 años hace | 0

Respondida
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).

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

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

más de 11 años hace | 1

| aceptada

Respondida
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) ...

más de 11 años hace | 0

Respondida
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')

más de 11 años hace | 2

| aceptada

Respondida
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 ... ...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 1

Respondida
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)

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

Respondida
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://...

más de 11 años hace | 0

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

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

más de 11 años hace | 0

| aceptada

Respondida
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))

más de 11 años hace | 1

| aceptada

Respondida
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.

más de 11 años hace | 0

Respondida
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: ...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

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

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
??? 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...

más de 11 años hace | 0

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

más de 11 años hace | 0

Respondida
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(:, ...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 1

Cargar más