Answered
How can I find the point which exceeds the previous 50 data points in a graph
Use <https://www.mathworks.com/help/matlab/ref/movmax.html |movmax|> to calculate the moving maximum of your datapoints with a...

9 years ago | 0

| accepted

Answered
How the concatenate every combination of vectors?
allvectors = {a, b, c, d, e, f}; %cell array of all the vectors allcombs = {}; for c = 1:numel(allvectors) combid...

9 years ago | 0

| accepted

Answered
Vectorization recursive vector operation
As long as the recursive relationship is linear you can use <https://www.mathworks.com/help/matlab/ref/filter.html |filter|>: ...

9 years ago | 1

Answered
How can i redistribute randomly the numbers in a matrix?
Have you looked at <https://www.mathworks.com/help/matlab/ref/randperm.html |randperm|> in the doc? yourmatrix(randperm(num...

9 years ago | 0

Answered
How can I resolve this error
a) The code you've posted does not include any multiplication in any of the *non-commented* lines. Therefore it cannot result in...

9 years ago | 0

Answered
Split into different columns a file with characters '?'
Even better than |xlsread|, <https://www.mathworks.com/help/matlab/ref/readtable.html |readtable|> would be a much better and mo...

9 years ago | 1

| accepted

Answered
deleting certain data (zeros) from some columns in data without line shift
yourmatrix(any(yourmatrix, :) ==0, :) = [] To delete rows where <https://www.mathworks.com/helpmatlab/ref/any.html |any|> c...

9 years ago | 0

Answered
Please suggest vectorization options for following code??
Assuming that a_i_i does not exist before the loop, or is just zeros, and assuming I understood correctly this completely uncomm...

9 years ago | 1

| accepted

Answered
i have a greyscale image of size 512x512 and i have divided into 4x4 non overlapping blocks so i get 16384 blocks to process, by processing it i get the last blocks only.
Well, in the expression |Di = ...| matlab doesn't know that you want to replace the |i| by whichever value |i| is at the moment....

9 years ago | 0

Answered
The number of consecutive ocurrances in an array
This is trivially achieved with |diff| and |find|: a = [0, 0, 1, 1, 1, 0, 0, 1]; transitions = find(diff(a)); runleng...

9 years ago | 1

Answered
how can i make this method as void? how can i use this method in an other script?
Rather than trying to translate some code from a language you clearly know nothing about, you should try to understand the (very...

9 years ago | 0

| accepted

Answered
Transformation of a multidimensional array into a vector
_"So it seems reasonable to make a transformation"_ No it doesn't. At all. Certainly not with the limited information provide...

9 years ago | 0

Answered
Assigning random values to image pixels
I = zeros(128, 128) I(32:96, 32:96) = rand(96-32+1, 96-32+1);

9 years ago | 4

| accepted

Answered
How can i convolve a unit ramp and unit step signal without using the 'conv' code ?
An easy way to implement a convolution without using |conv| is to implement the <https://en.wikipedia.org/wiki/Convolution_theor...

9 years ago | 0

| accepted

Answered
Invoke methods and access properties of a subclass by a super class
Yes, parent class, base class, super class all mean the same. And from your description, it is *not* what you need. inheritance ...

9 years ago | 1

| accepted

Answered
Replace Specific Value in Specific part of the Main Matrix
Another option is to save your matrix slice in a variable. Do whatever manipulation you need with that variable, then copy the m...

9 years ago | 0

Answered
How to test if a function handle belongs to a particular package?
Probably the simplest would be to parse the output of functions(yourfunctionhandle) The <https://www.mathworks.com/help/...

9 years ago | 0

| accepted

Answered
how to solve this error
As the error message states, your input to |imshow| is of class SURFPoints. |imshow| expects an image (i.e. a numeric or logical...

9 years ago | 0

| accepted

Answered
How do I find the percentage of a number of values within a certain range?
sum(x > -0.05 & x < 0.05) / numel(x) %number of values between -0.05 and 0.05 divided by total number Or if you want to do...

9 years ago | 0

Answered
Class Property: Array of Objects
I'm with Adam, I don't think you want a dependent property. _dependent_ does not mean that the property value is recalculated wh...

9 years ago | 0

| accepted

Answered
How to convert from cell with letters to double?
This? v = {'x1', 'x2', 'x3', 'x4'}; newv = str2double(regexp(v, '\d+', 'match', 'once')) %this regex extracts the integ...

9 years ago | 0

| accepted

Answered
How can I add elements of an array to another array?
Not really clear on why you'd want to do this, but this would work: randindices = randperm(numel(A), numel(B)); A(randin...

9 years ago | 0

Answered
convert struct of cell in a matrix of cell
Are you looking for {L1.l} %for row vector of cells or something more complex?

9 years ago | 1

| accepted

Answered
How can I write a for loop code which makes a scaling per column acording to: Y=(A-Amin)/(Amax-Amin)?
Assuming you're on R2016b or later, it's simply Y = (A - min(A)) ./ (max(A) - min(A)); In earlier versions: Y = bsx...

9 years ago | 0

| accepted

Answered
Creating a matrix by sorting the colums of another matrix
m = [0 4; 5 3; 1 3; 0 5; 0 1]; %demo data startrows = find(m(:, 1) == 0); out = cell(numel(startrows), 1); %can't use...

9 years ago | 1

| accepted

Answered
How to separate text data in a single colum to multiple columns based on context words
At this point I don't think the method you use for importing the data into matlab ( |readtable| or |xlsread|) is important. It's...

9 years ago | 0

Answered
Turning a modified image into a matrix
x = uint8(x); If the class of x is |double|, matlab assumes the intensity range is 0-1. When the class is |uint8|, matlab a...

9 years ago | 1

| accepted

Answered
reshape, remove 16 elements, keep 1000*8, remove ..
|reshape| into 16+1000*8 x N matrix, get rid of the first 16 rows, then reshape again. Finally a |permute| if you want N to be t...

9 years ago | 0

Answered
Will I receive "Out of Memory" error eventually: Both the "Memory available for all arrays" and "Memory used by Matlab" increase
Well, if both the memory available and the memory used keep on increasing with the available increasing faster than that used, t...

9 years ago | 0

| accepted

Answered
how to access each superpixel individually?
The thing is that despite the name, a superpixel is nothing like a pixel. It's not square, it's just an arbitrarily shaped regio...

9 years ago | 0

Load more