Top 5% contributor
I try this code to delete all row and column with all zero values in them. It simply works for deleting the columns with all zer...
Asked 3 years ago
data( all( ~any( data), 2 ), : ) = ; % removes all rows with all zero
data( :, all( ~any( data ), 1 ) ) = ; % and col...
Answered 3 years ago
this is my code:
the size of ...
I have two matrix A and B
I want to remove all row and columns with all NaNa in matrix A and accordingly delete the same row an...
I have a long string and I want to just exctract the names that have "hdf" as an extension:
I want just to get "MOD11C1....
Asked 6 months ago
I have :
x=1:12 %the index of months
No I want to change the position of x labels from below th...
Asked 2 years ago
col=[10 11 13 ];
I want to have b=[10 11 13; 10 11 13]
How can i do that?
I want to select a band of a matrix with slop (S) and save them in another matrix.
[ 1 2 3 4 ...
I want to remove the NaN column and row in my image so the size will be decreased, but since I used the "find' command it Matlab...
I know urlread and urlwrite to download files form server but my problem is how I can specify parts of a string resulting...
I want to read a='7/17/10 20:36' from excel to MATLAB.
I did that but I ended up ...
I have a vector that I want to sort but remove the duplicated values. I know I can do that with "unique"but I need t...
I have a function in a loop in which something plots and hold on the previous ones. After the loop I have a figure with 6 line (...
I have a 30 years of hourly data. Some of the data are missing. It means that I do not have data for example for 1 PM ...
I have a 2d matrix (100 by 4 )and I want to calculate the std for each 100 by 1 non-zero vector of this matrix,. But when i wrot...
I have a matrix with size(y)=(200*1*4). I want to calculate the std for each (200*1) vector separately. When I used "std(y(...
I have an image and I want to plot the Fourier coefficient for different angles of an Image?
I know the command is fft2 b...
I have a vector: a = [1 5 7 2 6 8 9 0 2] and b=[5 8 1 0 3 6 9 8 2] (both have the same size)
I want to sort vector 'a' and acco...
I have a problem. I have a big matrix that in each loop I search for some data that satisfy some conditions. The result of "find...
I have row=[1 2 5 4 3 6] and column=[5 7 3 4 8 14]. I want to select and put each Q(row,column) in a new data. for exampl...
I want to to find a<=x<b and c<=y<d in a matrix. But simply I can't. I would appreciate if you help me.
Converting all NaNs to zero in an image is my problem.
I have a matrix A(100 by 100) and I want to upsample the matrix (not by zero arrays) in a way the each cell is replicat...
Q = randi(456,10,15);
row=[1 2 5 4 3 6];
column=[5 7 3 4 8 14];
p = Q(row,column);
P = zeros(size(Q));
Hi if you already figured it out, would you please help me? I have the exact same question! THanks
Answered 7 months ago
I want to create this fun as below:
fun =@(x) x(:)+x(:).*diff(:)...
actually it was an simple example. But I want to remove rows with all NaNa and then remove the same rows from another matrix acc...
Join the conversation