Answered
How can I store tables object in an array?
Option 1 is to store your tables into a cell array. You can then use explicit loops or |cellfun| to apply the same code to each ...

8 years ago | 1

| accepted

Answered
Is it possible to have matlab go into debugging mode only when it hits a nan?
Have you looked at the documentation? It's right there in the documentation of <https://uk.mathworks.com/help/matlab/ref/dbstop....

8 years ago | 0

Answered
How do I make input/output in a function a vector?
You could wrap your existing near endless list of |if ... elseif| into a |for| loop... (see answer by Jesus) ... Or you could...

8 years ago | 0

Answered
syncing map image with coordinates
The convention for images is that the top left corner is the origin with the y-axis pointing down. However, you're using a diffe...

8 years ago | 0

| accepted

Answered
Categorising the star into different types
Use the 2nd return value of |ismember| as row index into your colour matrix: name = 'KKGAB'.'; type = 'ABGK'; colour ...

8 years ago | 0

Answered
can lab color space normalize?
_as we all know, the range of lab color space is ..._ Not really, this is a convention but like all colour encoding you can u...

8 years ago | 2

| accepted

Answered
Trying to convert string to number but the last number is not converting. What am I doing wrong in the code? The problem is B(j)=str2num(B(j)) row.
For a start it should be B{j} = str2num(B{j}); and I would recommend using |str2double| instead of |str2num|. Given the...

8 years ago | 0

| accepted

Answered
Add column of group sum to the right of matrix
[~, ~, uid] = unique(yourmatrix(:, [1 2]), 'rows'); uidsum = accumarray(uid, yourmatrix(:, 5)); yourmatrix(:, 6) = uidsum(u...

8 years ago | 1

Answered
How to define cell arrays that their elements are extracted from a Dataset?
I'm not very clear on what the edges and nodes in your graph should be. If the edges are defined simply by the pair Assignee and...

8 years ago | 0

| accepted

Answered
listening to the creation/deletion of a file with specific name.
Yes, with .Net it's very easy using <https://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher(v=vs.110).aspx |System...

8 years ago | 2

| accepted

Answered
How can I identify value of an array?
Please, do read the discussion on the <https://de.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-b...

8 years ago | 0

Answered
confusion for how to use switch with multiple inputs
yes, none of your tests make much sense. I find your use of spaces very strange. if C(k,1)& C(k,2) ==0 using brackets fo...

8 years ago | 1

| accepted

Answered
How to create doubles from cell arrays?
_if there is a more efficient code_ Yes, don't use cell arrays! a = randn(200, 5, 10); your |b{j}| is simply p...

8 years ago | 0

Answered
How to create sliding window
Ok, now the inputs are very clear. And the answer to your question is: don't do it! Here's a very simple rule: if you start n...

8 years ago | 0

| accepted

Answered
Image with Horizontal Longitudinal View
If I understood correctly. The multiframe image is greyscale or indexed, since each image is 2D, and the frame are the pages of ...

8 years ago | 0

| accepted

Answered
How to get a horizontal intensity scan line?
_get a horizontal intensity scan line in the middle of the image_ Isn't that very basic matrix indexing? yourimage(row, ...

8 years ago | 0

Answered
Wait a boolean variable becomes false
Well, you can always write a while loop that test that the property is false. %start simulation while yourcomobject.IsSu...

8 years ago | 0

| accepted

Answered
Sort raw data from a stream, with more zeros on top
numzeros = sum(yourmatrix(:, 1:6) == 0, 2); [~, order] = sortrows([numzeros, yourmatrix(:, 13)], [-1 2]); yourmatrix = y...

8 years ago | 0

| accepted

Answered
Finding difference between two rows
yourtable.ChangeReg = [0; diff(yourtable.NameOfFirstColumn)]

8 years ago | 4

Answered
How can I speed up my script? I'm using loops and contains function and I have to screen 14K X 167K variables
reference = readtable('MATLAB ASk2.xls', 'ReadVariableNames', false, 'Range', 'A:B'); raw = readtable('MATLAB ASk3.xls'); ...

8 years ago | 0

| accepted

Answered
How do I limit the range of a colormap when using imwrite
Before the call to |ind2rgb| (or |imwrite|), you need to rescale your matrix as colour indices so that the minimum is index 1 (f...

8 years ago | 0

| accepted

Answered
How to integrate anonymous functions
You cannot combine numbers (F and E) and functions with mathematics operations. You need to create a new function: True_Are...

8 years ago | 1

Answered
How to display and save individual connected components of a color image?
Note: the thresholding you perform using |imbinarize| only takes into account the luminance of the image. The colour information...

8 years ago | 1

Answered
where do I find documentation for helperCompareResponses
Most likely (don't have the toolbox so can't check), that function is included as part of the example. Therefore, other than wha...

8 years ago | 0

Answered
Undefined function 'immse' for input arguments of type 'uint8'.
|immse| was introduced in version R2014b and requires the image processing toolbox. If you're on an earlier version or don't hav...

8 years ago | 1

| accepted

Answered
How to make my code run faster
If all you want to do is count the number of lines in the file, then parsing it is a waste of time: numlines = sum(fileread...

8 years ago | 1

| accepted

Answered
How to test for a 1 x 0 cell array?
A 1x0 cell array is an empty array. |isempty| will return |true| for that, so your test is valid. >> c = cell(1, 0); >> ...

8 years ago | 1

Answered
Numerical integration with variable limits
Probably, %L, TP, T, w, a, AL, epsilon, all defined prior to next line innerintegral = @(y) w * (epsilon + a*y).^AL * L ...

8 years ago | 0

| accepted

Answered
Is there way to read powerpoint file and get data?
I've never automated powerpoint, but like any other office application it shouldn't be too hard. The powerpoint DOM is <https://...

8 years ago | 2

Answered
how to extract rows has a same value in column 1 and plot until those rows of column 2 and 3?
If all you want to do is plot the two columns against each other according to the first column, and assuming that the first colu...

8 years ago | 1

Load more