Question

how to compute the mean value of non-zero elements in each row of a sparse matrix

I built the following sparse matrix: o=[1 1 1 3]; C = sparse(o',1:length(o),ones(length(o),1),4,4); C = (1,1) 1 ...

30 days ago | 3 answers | 0

Question

computing the cumulative matrix with some conditions

Is there a very concise way to code up computing the cumulative matrix of the following matrix on each column given the followin...

1 month ago | 2 answers | 0

Question

finding the file names with similar strings and group them together

In a file I have a bunch of plots which I would like to plot the one which have the same hyper-parameters (values for given vari...

2 months ago | 0 answers | 0

Question

decrease the vertical space between the subplots

I am using this function. How can I decrease the vertical space between the subplots in my figure using this code? I would like ...

2 months ago | 1 answer | 0

Question

setting the limits for negative values for colormap

I am trying to set the limits for color in the image plot type by using this code for g = 1:size(C,1) subplot(6,1,g+4); ...

3 months ago | 2 answers | 0

Question

putting a plot as different slices on an axis

I want to use matlab to plot in different time-steps an agent who is moving to different places in this structure: pgon = polys...

3 months ago | 1 answer | 0

Question

remove empty column at the beginning of pcolor

I made a pcolor plot from a 2D matrix. It seems pcolor generates an empty column at the beginning of the plot. Any suggestion ho...

5 months ago | 1 answer | 0

Question

converting python script to matlab

I am new in Matlab and I am trying to move some part of a python code to my matlab script. I have a bit of problem finding the...

6 months ago | 1 answer | 0