Answered
what can I do?
A = [10 25 30 45 50 150 300 450 500 501 502 600 630 700 720 800 801 81...

10 years ago | 1

| accepted

Answered
How to replace zeros in one matrix with another matrix
An example would clarify what you want. Possibly: To replace all zero values in A by consecutive values in B, B must have as ...

10 years ago | 0

Answered
How can I create a table in Access with Matlab that allows for different names of columns and rows without being hard coded?
Note that you can link <https://support.office.com/en-gb/article/Import-or-link-to-data-in-an-Excel-workbook-a1952878-7c58-47b1-...

10 years ago | 0

| accepted

Answered
take out numbers from string
There's no point in creating two different variables when it's much easier to have the output as two columns of the same variabl...

10 years ago | 1

| accepted

Answered
How to fill different circles using a 'jet' colormap to represent data values
Same as José-Luis, I'm not too sure what exactly you want to achieve. However, if whichever function you want to use only accept...

10 years ago | 0

Answered
how to combine two data in one column?
C = [A; B] Use |;| instead of |,| to concatenate vertically. Or use the explicit function: C = vertcat(A, B);

10 years ago | 1

Answered
extracting numbers from strings
Using |regexprep| seems roundabout. Why not use |regexp| to extract what you need rather than replacing what you don't need? ...

10 years ago | 0

Answered
Please help - Matlab novice here: Error using fprintf. Invalid file identifier. Use fopen to generate a valid file identifier.
Unfortunately, |fopen| doesn't throw an error when it fails to open a file. It would have made your problem clearer if it had. A...

10 years ago | 0

Answered
How can I match similar events between 2 matrices?
If I understood correctly, all you need is one line of code using <https://www.mathworks.com/help/matlab/ref/ismembertol.html |i...

10 years ago | 0

| accepted

Answered
How to transform a matrix from a text file to numeric matrix to perform calculations with.
As per Stephen's comment, I'd recommend using |dlmread| (or similar |csvread|) or at a push |textscan| (which makes the code mor...

10 years ago | 0

| accepted

Answered
ERROR: The rank of the system is 0!
The only matrices with rank 0 are matrices full of zero. You need to review your input! The <https://en.wikipedia.org/wiki/Ra...

10 years ago | 2

Answered
Reading excel numbers with formatting in matlab
Probably the easiest is to use a custom function with |xlsread|. Create the following custom function: function [range, tru...

10 years ago | 0

Answered
Sum of column in multiple Matrix with different lenght but same axis
Note that there is no 0 index in matlab. Indexing starts at 1, so your |Measurementdata1(0,1)| is not valid. It sounds like y...

10 years ago | 0

Answered
parent1= 0 0 0 0 1 0 0 1 and parent2=0 0 0 0 1 1 0 0 and i have another parent 1 to 50 element and i want swap 7 and 8th raw
Don't number variables. It's going to give you problems later on. You can't chain indexing. What you mean by p(2, :)(end)...

10 years ago | 0

| accepted

Answered
How can I check whether an argument is given or not (inputParser)?
Well, if the behaviour of your code is going to change depending on whether or not an optional input was given, then it's not re...

10 years ago | 2

Answered
Comparing lists of years for similarity
It sounds like you need some sort of <https://en.wikipedia.org/wiki/Edit_distance edit distance> calculation. A pure edit distan...

10 years ago | 2

Answered
How to convert any Matlab variable into vector of bytes (decode/encode)
There are no official method of serialising / deserialising objects in matlab, other than saving them in a mat file and storing ...

10 years ago | 1

| accepted

Answered
Loop concerning workspace names
Way to go in answering your own question and not giving anybody else a chance to offer a different option! This is completely...

10 years ago | 0

| accepted

Answered
How to extract elements along one dimension in an n-d array based on an arbitrary criterion.
One possible way, using |ind2sub|: [~, page] = min(abs(A), [], 3); [rows, columns] = ndgrid(size(A, 1), size(A, 2)); ...

10 years ago | 1

| accepted

Answered
I don't understand this question, does someone else?
It's very clear to me. Example input: n = 5; C = {[1 3 4]; [2 5]; []; 4; 1:5}; Desired output: tf = logical([...

10 years ago | 0

Answered
Not splitting correctly?
Any reason that |R| is a cell array instead of a S*numel(DNA_H) matrix? The problem with your algorithm is that R_Split does ...

10 years ago | 0

Answered
Can I merge two matrices of different length with respect to a date column contained in both?
It's trivial to do using <https://www.mathworks.com/help/matlab/ref/intersect.html |intersect|>: tstart = datenum(now); ...

10 years ago | 0

Answered
error in std for 3d matrix
_Error: First argument must be *single or double*_ Well, clearly, your first argument (a transform of X) is not single or dou...

10 years ago | 0

Answered
Inner matrix dimensions must agree
The only matrix multiplication in your line is b*ebuf(F-P+1:F) |ebuf(F-P+1:F)| is clearly going to be a vector and sinc...

10 years ago | 0

Answered
How to calculate only one centroid of an image?
Well, the definition of the centroid is simply the mean of the coordinate of your points, so: [rows, cols] =ndgrid(1:size(yo...

10 years ago | 1

| accepted

Answered
Compare all elements of a vector against each other
If |v| is the mean of the rows (e.g. obtained with |v = mean(y, 2)|), shouldn't it be a column vector rather than a row vector a...

10 years ago | 1

Answered
How can i combine several matrix elements in one?
The bigger question is why do you want to do this. I can't think of a single scenario where the representation you're asking wou...

10 years ago | 0

| accepted

Answered
How to create a matrix with user-defined distribution?
Since the distribution of 1, 2 and 3 is fixed per column and it's just the position that varies, simply use |randperm| to genera...

10 years ago | 0

Answered
Accessing cell arrays within a cell array and merging them together end to end or in the same column/row
Because the cell arrays in each cell are all row vectors they can only be concatenated horizontally, thus: [exampledata{:}]...

10 years ago | 0

| accepted

Answered
Partial overwrite of data in a structure
_"when I am restructuring the data it always a hassle to put every data holder variable to a proper place"_ If it's a hassle, th...

10 years ago | 0

| accepted

Load more