Answered
find a row in a multidimensional cell array
Search = {'FBgn0039563' 'FBgn0264492' [0.8405]} Match = strcmp(temp(:, 1), Search{1}) & ... strcmp(temp(:, 2),...

9 years ago | 0

Answered
how to remove the last and before the last element from cell?
Run a loop over the elements of the cell (the output |b| looks like you want it flipped?): for k = numel(a):-1:1 b(num...

9 years ago | 0

Answered
Different results with different versions of Matlab. A way to detect what functions changed?
As Adam said already: # You need to read the list of changes in the documentation. # Only an exhaustive self test of the cod...

9 years ago | 0

Answered
Why GUI data is getting deleted after execution of push button command (GUIDE) ?
all my variables stored in workspace is getting deleted This leaves to details unclear: # *Which* workspace # How are th...

9 years ago | 3

Answered
How to populate a cell array with vector elements?
I have a cell array consisting of n-number of cells I assume this means: n = 17; C = cell(1, n); But what does th...

9 years ago | 1

Answered
Interp1 error when I moved the .m files into a different folder
The file |interp1.m| is located inside C:\Program Files\MATLAB\<MatlabVersion>\toolbox\matlab\polyfun\ . It must be stored...

9 years ago | 0

Answered
How to declare multiple output arguments ?
It seems to me that this is not the right way to declare output argument I agree. Although it is syntactically correct and e...

9 years ago | 1

| accepted

Answered
How to assign values for uitable using a for loop?
This is based on pure guessing, isn't it? Neither |handles.table1(i,1)| nor the 'String' property is meaningful. Did you read th...

9 years ago | 1

| accepted

Answered
Projections' Angles of Line in Space
The vector [xp, yp, zp] projected in the XZ plane is [xp, 0, zp]. Its normal vector is: [xp, 0, zp] / norm([xp, 0, zp]); ...

9 years ago | 0

| accepted

Answered
I want to vary how much of a plane is filled with the angle of the plane with the horizontal, any help?
x = 1:300; y = 1:300; m = atan(30 * pi / 180); % 30 deg k = bsxfun(@plus, m * (x - 150), y.' - 150) > 0; % Rotate a...

9 years ago | 0

Answered
how to add "large arrays" (64 bits) to codegen generated function?
|codegen| creates C code, as far as I understand. The C code itself is not limited to 32 or 64 bit. 32 bit compilers can work wi...

9 years ago | 0

Answered
input the default value in an edit box of a GUI as an input from a file?
Import the file in the OpeningFcn of the GUI (if you have created it by GUIDE). Then you can populate the edit boxes with the va...

9 years ago | 0

Answered
How to convert mexa64 to mexw64?
This will not work. A code compiled for a Linux system cannot be converted to a Windows version directly. It will be much easier...

9 years ago | 1

| accepted

Answered
uipickfiles Error with R2015b
What is "uipickfiles"? This function does not belong to Matlab's toolboxes. Do you mean <https://www.mathworks.com/matlabcentral...

9 years ago | 1

Answered
help, error message: Subscripted assignment dimension mismatch.
Use the debugger to examine the problem. Type this in the command window: dbstop if error Now run your code again until ...

9 years ago | 0

| accepted

Answered
Binary Image: Count number of pixels that are 1.
Alternatively without a loop: bw = imbinarize(I); ctr = sum(bw(:) == 1); or even shorter for a binary image: ct...

9 years ago | 4

Answered
How do i correct for ,"index exceeds matrix dimensions" of the following Sample Entropy code
Due to the absence of copmments, the readers cannot guess the purpose of this line - and most likely the author of the code cann...

9 years ago | 0

Answered
I have a 300 x 150 zeros matrix and want to change only the lower triangular elements to 1, How do I do that?
In Matlb >= R2016b: M = (1:300).' >= (1:150); For older Matlab versions: M = bsxfun(@ge, (1:300).', 1:150);

9 years ago | 0

Answered
How to create a user interface for a function in Matlab?
You can either use the tools GUIDE or APPDesigner, or create the GUI programatically. It matters if you want to learn something ...

9 years ago | 1

Answered
Try/Catch Evalc and display output if error
Why do you need |evalc|? If the output is written to the command window, you get the information directly without tricks. t...

9 years ago | 1

Answered
Plotting a single time series with double y axes, differently labelled
dmin = 0; % Do not shadow the builtin function "min" dmax = 9; x = dmin:dmax; y = floor(10 .* rand([max+1 1])); % in...

9 years ago | 1

Answered
Vectorize a simple code
Note: See <https://www.mathworks.com/matlabcentral/answers/35676-why-not-use-square-brackets> : Even omitting the unneeded squar...

9 years ago | 1

| accepted

Answered
Sorting specific rows with a specific column
The question is not clear. What does "sort with column 2" mean? A guess: A = [1 6 50; 5 2 50; 7 1 50; 2 5 53; 5 1 53; 7 3 5...

9 years ago | 0

| accepted

Answered
Funktion "gausswin" does not work for me, it says undefined variable
If you run Matlab 2015(a or b?) and have a license for the corresponding Signal Processing Toolbox: yes. If you do not have a li...

9 years ago | 0

Answered
How to calculate the area percentage of the polygons?
If the overlap matters and you have the Mapping toolbox, you can start with the rectangle as polygone, then subtract all polygon...

9 years ago | 0

Answered
Saving a .fig file as a .png
You forgot to mention how you create the PNG file. With a screenshot the output equals the display on the screen exactly: F...

9 years ago | 0

| accepted

Answered
Array value changing for no apparent reason?? Is it possible there is hidden lines of code?
As far as I can see, the only command, which is executed during the value changes is *not* |display()|, but |title|. Pleas be so...

9 years ago | 0

Answered
Error using pause Interrupt while evaluating figure KeyPressFcn ?
Nothing is wrong. Operation terminated by user during snark/keyPress is the expected message for a ctrl+c. It is likely ...

9 years ago | 0

Answered
How to count frequency of non zero elements col wise
A = [1 2 3 0 0; ... 2 2 0 2 1; ... 1 0 2 3 1]; nCol = size(A, 2); Edges = [unique(A(A ~= 0)); Inf]; ...

9 years ago | 0

Answered
Dynamically reorder subplots in GUI
Hm. I've written a small example which shows, that moving the existing axes is not tedious: function Callback(hObject, Even...

9 years ago | 0

| accepted

Load more