Answered
How do I make a cell with the following contents?
If I understood correctly, a simple way to find all genes would be: [genesequences, starts, stops] = regexp(x, 'AUG.*?(UAA|...

10 years ago | 1

| accepted

Answered
Delete Data from a Cell Array
Calling your cell arrays |AA|, |AA1|, |AA2| is not a particularly good idea. These are completely meaningless names that just ob...

10 years ago | 2

| accepted

Answered
Help with the unique function
If you look at the output of b - 15 You'll see that some (or all) these 15.0000 are not actually 15.0000 but something ...

10 years ago | 0

| accepted

Answered
I need the callback function to take in the object receiving the broadcast as input.
The receiver has no business being a property of the event data, so it wouldn't make sense to be an argument of the callback. ...

10 years ago | 0

Answered
How to create a 2D array from the first column of a 3D array?
2Darray = squeeze(3DArray(:, 1, :)); %or 2Darray = permute(3DArray(:, 1, :), [1 3 2]);

10 years ago | 0

| accepted

Answered
Using strcmp on multiple strings to get a logical array
Another option which may or may not be faster than |cellfun(...)|: Event = {'a1','b1','a1','c1','b1'}'; Check = {'a1','...

10 years ago | 3

Answered
How can one perform a function on a particular section of a table? And again a further section inside that section.
It's not clear if you truly have what matlab calls a <https://www.mathworks.com/help/matlab/tables.html table> or just a plain m...

10 years ago | 0

| accepted

Answered
How to omit repeated X values in a table and assign a new computed Y value?
[xvals, ~, subs] = unique(yourmatrix(:, 1)); newmatrix = [xvals, accumarray(subs, yourmatrix(:, 2), [], @mean)]; Or use ...

10 years ago | 2

| accepted

Answered
Combining and reading data from Excel (.xlsx) into Matlab
(i) The easiest way to read an excel file in matlab is with <https://www.mathworks.com/help/releases/R2016b/matlab/ref/readtable...

10 years ago | 0

| accepted

Answered
Strange problem while using Matlab structures
_"I have a structure"_ No, you have not. As your screenshot shows (and just pasting the code would have been better, see Step...

10 years ago | 2

| accepted

Answered
Subscript indices must either be real positive integers or logicals. I have FastICA code from Pryathm. BUT, i get error
Since you haven't given use the *full* text of the error message, particularly the bit that shows which line causes the error, ...

10 years ago | 0

| accepted

Answered
How can I test if a number is irrational?
I don't think you've thought this through properly: # Nobody knows a way to find whether an arbitrary number is irrational. ...

10 years ago | 6

Answered
How to overwrite 'NaN' strings in a table using the for-loop
It's puzzling why you think that |isnan| is going to return true on a string (even if that string is |'NAN'|). To find if a stri...

10 years ago | 0

| accepted

Answered
Finding NaN values in Structure
As others have said, do not use |eval|, particularly as there's a <https://www.mathworks.com/help/matlab/matlab_prog/generate-fi...

10 years ago | 3

| accepted

Answered
how can my app inherit from my classes
The app (GUI) should not inherit methods from your class and it's a good thing matlab actually prevents it. This would be antith...

10 years ago | 2

| accepted

Answered
tall array assignment with tall logical vector
The documentation does not match the actual implementation by MathWorks. The error is generated at line 32 of |fullfile(matlabro...

10 years ago | 2

| accepted

Answered
Read values from a variable
wsectionstart = str2double(diagramoptions.Value(strcmp(diagramoptions.Key, 'wsectionstart'))); should solve the problem?

10 years ago | 0

| accepted

Answered
Input argument "T" is undefined.
As others have said, we need the full text of the error message and more details about how you call the function to help you wit...

10 years ago | 0

| accepted

Answered
How to transfer a few rows randomly from a matrix A to other matrices of the set of N matrices?
Really, the easiest is to concatenate your matrices into a 3D array. Assuming your |ResultM| is a cell array: allmatrice...

10 years ago | 1

| accepted

Answered
Querying through a vector
With your latest comment, have you actually looked the content of |sqlquery| you generate? You'll see it didn't add the latitude...

10 years ago | 1

Answered
How to transform 'double' into 'cell array'?
Clearly from the error message, one of the rows of |A| has a double matrix instead of a cell array in column |L|. The simplest w...

10 years ago | 0

Answered
Labelling a point on a map
text(-52, 60, '(60 N, 52 W)');

10 years ago | 0

Answered
how to run a loop over an array with matrices and multiply each matrix with an other array?
Taking a complete guess at what you're trying to do since the code you've given makes absolutely no sense (total gets overwritte...

10 years ago | 0

| accepted

Answered
How can I split a string and assign new values to the strings?
This is even simpler, using the newly introduced <https://www.mathworks.com/help/matlab/ref/replace.html |replace|> (R2016b): ...

10 years ago | 1

| accepted

Answered
is sendEmail a matlab function?
No, |sendEmail| is not a matlab function. <https://www.mathworks.com/help/matlab/ref/sendmail.html |sendmail|> is, but as it req...

10 years ago | 0

Answered
how can I generate matrix from each cell array and then separately apply matrix operation on each matrix?
If you're trying to generate a 3D array, I would do it like this: pop = randi([Vmin, Vmax], [npop, nVar]); Z = zeros(npo...

10 years ago | 2

Answered
How can i recover from this error, Sub scripted assignment dimension mismatch error?
There are two possible reasons for the error. We don't have enough information to know which is the cause of your problem: 1)...

10 years ago | 0

| accepted

Answered
The pixel values are not all 255 in 256*256 matrix.But I get a white image.How?
My guess is that you're using imshow(someimage); and |someimage| is of class double. The class of the image matters for ...

10 years ago | 0

Answered
loop for finding a threshold and change corresponding number
As per my comment to the question, the loop you've shown is unnecessary: aa = (data - min(data, [], 2)) ./ (max(data, [], 2...

10 years ago | 1

| accepted

Answered
Create a matrix from 2 vectors
There is nothing wrong with using loops when they make the code clearer. This is, arguably, the most efficient *loop* version: ...

10 years ago | 1

Load more