Respondida
How to solve : Subscripted assignment dimension mismatch error
tst is a vector, so you cannot store it in a single scalar tst(ii,jj). Same for M(ii,jj). This may work: M = nan(numel(id)...

más de 10 años hace | 0

| aceptada

Respondida
How to make contour plot of given matrices
x = -10:0.2:10; y = 1:101; [X Y] = meshgrid(x, y); G = X.*f(Y)+0.95*h(Y); contour(G, [-5 -3 -1 -0.1 0 0.1 1 3 5])

más de 10 años hace | 1

| aceptada

Respondida
how to shuffle two vectors?
u = rand(1,10); v = 10*rand(1,10); uv = [u; v]; uv = uv(:)'; or n = numel(u); uv([1:2:2*n-1 2:2:2*n]) = [u v];

más de 10 años hace | 1

| aceptada

Respondida
how to get struct array field as a vector?
age = [data.age]; agegt18 = age(age>18);

más de 10 años hace | 15

| aceptada

Respondida
Signal to Noise Ratio (SNR)
20dB, 25dB is not the power of the noise, but the signal to noise ratio (SNR) in decibel. It is computed as SNRdb = 10*log10...

más de 10 años hace | 11

| aceptada

Respondida
How to crop an image A which is a subset of an image B
If I understood correctly, you have found the part in image B that is exactly like image A, and now you want to crop that part o...

más de 10 años hace | 0

Respondida
How to pick random numbers with fixed sum from a certain array?
A = [1 3 1 1 2]; r = 0:0.1:1; r = r(randperm(numel(r))); B = []; ir = 1; for i = 1:numel(A) if A(i) ...

más de 10 años hace | 0

Respondida
matrix of zeros and ones within number of zeros in each rows in-between a limit
A = zeros(40,30); Omin = 10; Omax = 20; for i = 1:size(A, 2) r = randperm(40); ind = r(1:(Omin-1) + randi(Omax - Om...

más de 10 años hace | 1

| aceptada

Respondida
How can I save a heavy image?
Use imwrite.

más de 10 años hace | 0

| aceptada

Respondida
Find only the top peaks
pks = findpeaks(data, 'MinPeakHeight', 3.5);

más de 10 años hace | 0

Respondida
Importing a table from a website
This may be useful <http://www.mathworks.com/matlabcentral/fileexchange/29642-get-html-table-data-into-matlab-via-urlread-and-wi...

más de 10 años hace | 0

Respondida
Numbering lines passing through centre of circle and located at 0,90,180,270 degrees
axis([-2 2 -2 2]), axis equal for i = 1:4, text(cos(pi/2*(i-1)), sin(pi/2*(i-1)), int2str(i)), end

más de 10 años hace | 0

| aceptada

Respondida
How can I plot x y z coordinates
One way to visualize your data would be plot3(X,Y,Z, 'o')

más de 10 años hace | 4

| aceptada

Respondida
what difference does it make if we use rand and randn
1. Basically rand generates uniformly distributed data and randn normally distributed data. For more, have a look at help ra...

más de 10 años hace | 3

Respondida
what is the relationship between noise and outliers ??
You need a model of your data. There is no general relation between noise and outliers. You may find the following useful http:/...

más de 10 años hace | 0

Respondida
How can i extract temperature information from a gray scale image?
If the camera captures just visible light, you cannot compute temperature from it in general. Only in special cases where you im...

más de 10 años hace | 1

Respondida
Summing specific values in arrays
If you don't need all values you can use the one-liner s = sum(X(X(:,1)==2, 2)); X(:,1)==2 results in a logical array tha...

más de 10 años hace | 0

| aceptada

Respondida
rearrange matrix to vector
B = reshape(A', 1, []);

más de 10 años hace | 0

| aceptada

Respondida
Script not finding variable even when the variable is in my workspace
The variables X and Y in your workspace are not known inside the function. You can use the following, but it's not considered go...

más de 10 años hace | 1

| aceptada

Respondida
How to calculate the time of a motion
Use tic and toc.

más de 10 años hace | 0

Respondida
Image Processing Toolboxのgraycomatrix関数について
The default offset is [0 1]. See help graycomatrix

más de 10 años hace | 0

Respondida
Want to remove 'noise' from a matrix.
x(x < 20) = 0; BTW: Please don't call your variable input, it's a Matlab function.

más de 10 años hace | 1

Respondida
Legend for plot genereted by a loop
Store a handle to each plot in h(i) and let the legend refer to this handle h: col = rand(3, 3); data = rand(3, 100); a...

más de 10 años hace | 0

| aceptada

Respondida
Blurred Image after DCT image compression.
It seems that you have reduced the resolution of the image by 8.

más de 10 años hace | 0

Respondida
i got 450082 number or data. To process the data i need to make sampling rate to separated that data in a frame. how to process that data in every frame?
for i = 1:256:numel(z) zi = z(i:i+255); % get the i'th chunk of 256 values % do some sample computations on ...

más de 10 años hace | 0

| aceptada

Respondida
Tutorial request for 2D Animation
google matlab moving dots animation I've found this quite nice <http://www.mbfys.ru.nl/~robvdw/DGCN22/PRACTICUM_2011/LAB...

más de 10 años hace | 0

Respondida
multiplying a 1xn vector to each element of a 1xm vector to create a 1xmn vector
x = d'*v; x = x(:);

más de 10 años hace | 1

| aceptada

Respondida
whats wrong with the code?
x(i)==0:pi/2 compares x(i) to 0 and 1 (largest integer below pi/2) and gives the result in matrix of size 1x2. A matrix is c...

más de 10 años hace | 1

Respondida
Sub indexing into cells
Xnew = X(ind, :);

más de 10 años hace | 0

| aceptada

Respondida
Remove 2D points that exceed std dev in either axis
You can determine the cut-off threshold on the sorted data but remove the values from the top and the bottom in the unsorted dat...

más de 10 años hace | 0

| aceptada

Cargar más