Answered
Deserialized containers.Map keys exceed max name length
To put it kindly, the json serialisation and deserialisation code in matlab is not very mature nor very thoroughly tested. For a...

9 years ago | 1

| accepted

Answered
How to eliminate a for loop that uses indexes?
One possibility: H_out = sqrt(arrayfun(@(s:e) sum(H_in(:, s:e), 2)/(e-s+1), a, b)); No guarantee that it'll be faster th...

9 years ago | 0

Answered
Detect warning and take action
You can treat warnings as errors and thus catch them with a |try ... catch| statement, however, it is undocumented and may break...

9 years ago | 4

Answered
removing previously selected points from image and displaying value?
|plot| returns a handle to the points/lines it created. To get rid of these lines/points you call the |delete| function on these...

9 years ago | 1

Answered
summation of image exceeds matrix dimention
You have two errors in your code. These errors are easy to make because, in my opinion, a) the documentation of |regionprops| do...

9 years ago | 0

| accepted

Answered
Error using vertcat Dimensions of matrices being concatenated are not consistent.
_my assumption is my Zt value is 1x1_ I don't understand why you assume that. |Zt| depends on a bunch of variables that all d...

9 years ago | 0

Answered
Sum all answers from structured array field
Simply, sum([X(k).NumberSamples]) Note the use of |[]| to convert the <https://www.mathworks.com/help/matlab/matlab_pro...

9 years ago | 0

| accepted

Answered
How to create a vector with certain numbers?
Simply repelem(1:10:1000000, 10)'

9 years ago | 0

| accepted

Answered
How to Convert uint8 to Cell
I don't know where you got that toolbox but it's been poorly written (unnecessary else, incorrect test of size, and the name of ...

9 years ago | 0

Answered
Storing data in nested for loop
This has nothing to do with the cell array. Within each cell of your cell array, you have a 3D matrix. You are looping over ...

9 years ago | 0

Answered
Nested for loops problem
Using no loop at all: M = [5 0 3 0 8 2 1 2 3 2 2 2]; [~, ~, su...

9 years ago | 0

Answered
Can I specify the variable name to use as a key when I use innerjoin() or does it have to be a column number?
It's all very well <https://www.mathworks.com/help/releases/R2017a/matlab/ref/innerjoin.html#namevaluepairarguments documented>....

9 years ago | 0

| accepted

Answered
Merge RGB image and grayscale image MATLAB
rgbimage = repmat(yourgrayimage, [1 1 3]); rgbimage(floor(end/2), floor(end/2), :) = [1 0 0]; %if image is of class double...

9 years ago | 0

| accepted

Answered
adding a fresh .NET assembly gives a warning : Warning: Assembly xxx has already been added from location
I'm not really sure why your code is not working properly. However, since |asm| is supposed to be a singleton, defining it as a ...

9 years ago | 0

| accepted

Answered
How to clear array in between multiple plots in for loop?
The immediate problem is that indeed you fail to clear your |temp_array| at the beginning of each step of your |u| loop. Simply ...

9 years ago | 2

| accepted

Answered
How to get an x coordinate from a given y?
One usually uses indexmax = find(max(y) == y); when there can be several |y| values that are equal to the max, as |inde...

9 years ago | 0

| accepted

Answered
Any suggestion for the method I should use for calculating the sum of the event which has zero values and its duration with matlab?
Looks like you use excel macros, not VBA. In any case, no you should not do the same method at all in matlab. Matlab is a lot mo...

9 years ago | 1

| accepted

Answered
How to solve the code}
It's not very clear what exactly you're intending to |gfmul|. If it's the two numbers that are represented by the binary pattern...

9 years ago | 0

| accepted

Answered
i want to matrix merge but find problem
Well, yes, b, c and d must have the same number of columns for you to vertically concatenate them. your d has 10 more columns th...

9 years ago | 0

Answered
histogram vector with deltaN specified
There are no weighted histogram function in matlab as far as I know. It's not really hard to implement: x = [1.7 2.2 1.7 3....

9 years ago | 0

Answered
How can I combine the content of 2 cells in array into one cell?
polyval([2 5 3], 10) would be one way. This is basic math and how you construct numbers. Note that matlab has something ...

9 years ago | 1

| accepted

Answered
How can I change the order of the file names in a struct?
Use Stephen Cobeldick's <https://uk.mathworks.com/matlabcentral/fileexchange/47434-natural-order-filename-sort |natsortfile|> fr...

9 years ago | 1

| accepted

Answered
Get maximum number of outputs from anonymous function
Use the conversion of <https://uk.mathworks.com/help/matlab/matlab_prog/comma-separated-lists.html#br2js35-14 comma-separated li...

9 years ago | 0

Answered
adding values to table at each step
If I understood correctly you're generating tables in a loop and want to fill another table one row at a time at each step of th...

9 years ago | 0

| accepted

Answered
Recursive function to find median
Probably the most important thing is that your algorithm *is not recursive*. A recursive function is a function that calls itsel...

9 years ago | 0

Answered
Put cells with rowise strings togehter
fprintf(fid, strjoin(yourcellarray, '\n'))

9 years ago | 0

Answered
Bridge game shuffle simulation
Shuffling can easily be achieved by using a random permutation of the rows generated with <https://uk.mathworks.com/help/matlab/...

9 years ago | 0

Answered
Regexp to filter file names
Note that the reason you get cell arrays in your structure is because as you've used it |regexpi| returns a cell array of cell a...

9 years ago | 2

Answered
How to use a relative path for NET.addAssembly
Well, you have no guarantee that the current matlab working directory is 'D:\CERDEC\liveFeed\'. And honestly, it is much better ...

9 years ago | 1

| accepted

Answered
Storing values form a while loop within a for loop.
for (ii) = That is not a valid matlab syntax Q(k) = k Well, that just store the value of |k| at index |k|, so |Q| ...

9 years ago | 1

| accepted

Load more