Answered
Error to this line.Functions cannot be indexed using {} or . indexing.
The error message is clear already, isn't it? The core problem is: fn = {dir(xyz).name}; If |dir| is a command, you cann...

9 years ago | 0

| accepted

Answered
Problem with nested or local functions in GUIDE
it says that some function were not closed with an end statement This is a full description of the problem already. * If ...

9 years ago | 0

| accepted

Answered
Error: Unexpected MATLAB expression.
"(2*n-1)2*x" is no valid Matlab expression, because the operator after ")" is missing. I guess: f = symsum((1/(2*n-1))*sin(...

9 years ago | 3

Answered
type if x is a square matrix statement
funcz = ~ismatrix(x) || (size(x, 1) ~= size(x, 2)); or with Matlab versions before R2010b: funcz = (ndims(x) ~= 2) || ...

9 years ago | 1

Answered
drawnow and refreshing screen
|drawnow| processes all events waiting to update the interval values of the figure, e.g. rendering of created |uicontrol| 's or ...

9 years ago | 1

Answered
obtaining random data in cell array
randi([1,100], 1) or simpler randi(100)

9 years ago | 0

Answered
I run a matlab code. I get the plots but do not get the variables in workspace. Somebody please help me to fix this.
The warning tells you, that the default "Trust-region-dogleg" cannot be applied to your problem. You can use |optimset| to enabl...

9 years ago | 0

Answered
Undefined function or variable
You do not use |left| as a vector and it is not replied as output also. Then omit the "(i)": function y = ratioimg(u) [...

9 years ago | 0

| accepted

Answered
How can i make comparison faster
index = (rd(ind, :) >= r | td(ind, :) >= t); D = C; D(index) = 1; gSum = sum(prod(D, 2));

9 years ago | 1

| accepted

Answered
Cumulative sum with a for loop
Further solutions: * DOT product: v = 1:n; s = v * v.'; This uses one temporary vector only, while |sum(v .^ 2)| n...

9 years ago | 0

Answered
Why is text() unable to orient output in 3 axes?
Why is text() unable to orient output in 3 axes? It is the idea of |text()| to operate in 2D. Any workarounds? You ha...

9 years ago | 0

Answered
Find indices in cell array
After the data are converted to a numerical array, the processing is very efficient. Consider, if it would be better to store th...

9 years ago | 0

Answered
how to change values from other script ?
You do not change the value of a variable "in the same time" inside another script. Scripts share the workspace (list of variabl...

9 years ago | 1

Answered
Equalizing array of uknowns with a known array
Do not create variables dynamically. This is the most frequently ask question and the answer is always the same: This is a very ...

9 years ago | 2

| accepted

Answered
How to get the time between two key presses on keyboard while typing?
Di you want to record this during the user types in an |uicontrol| - edit field? Or do you want to scan the keys while other pro...

9 years ago | 0

Answered
The specified module could not be found! matlab 2014b
It is not "math.dll", which is missing, but a module used inside this library. Did it run before? Does it run on another compute...

9 years ago | 0

Answered
How to solve a logarithmic equation?
No, no root here: x = linspace(0,1,1000); plot(x, 7 * x .* log(x) - 2); <</matlabcentral/answers/uploaded_files/92048...

9 years ago | 0

Answered
Is there any quantitative technique available for estimating the magnitude of different curves.
It depends on what you call "magnitude" or "variation". Perhaps: Range = max(x) - min(x); % This is called "Range...

9 years ago | 0

Answered
How can i XOR these two numbers?
What are the types of X and U? Are they double or char vectors? Please post the input, such that it can be used by copy&paste. ...

9 years ago | 1

| accepted

Answered
What is the difference between convertToString and num2str?
As you have found out already, |convertToString()| is not a documented function of Matlab. I do not even know this function. So ...

9 years ago | 0

Answered
How can I store this data?
L = cell(511,54); L(:) = {'False'}; L(MSet==1) = {'True'}; Or: Pool = {'False', 'True'}; L ...

9 years ago | 0

Answered
Synchronizing vectors of different lengths
If all input vectors belong to measurement of the same time range, a correct interpolation would result in arrays of the same nu...

9 years ago | 0

Answered
How to fit a 3rd order polynomial to all possible pairs of columns in two matrices?
Actually the 2nd input of |polyfit| could be a matrix also. function P = PolyFitM(x, Y, n) % Construct Vandermonde ma...

9 years ago | 0

Answered
Limit x-axis to specific values in GUI
Avoid setting the current axes actively. Better define the parent object to draw in: % Instead of axes(handles.axes1) ...

9 years ago | 0

Answered
Is it possible make parallel processing using MEX and OpenMP on Matlab?
Is |newdata| pre-allocated? newdata = zeros(max(indexChannels, 720)); % A guess, adjust to the available info f...

9 years ago | 0

Answered
Passing variable sized arguments to a method
I do not know this toolbox and installing it just to answer this question might be inefficient. Do I understand correctly, that ...

9 years ago | 0

Answered
Search for excel spreadsheet with name or symbol
The function |xlsfinfo| gives you a list of the sheet names: [status, sheets] = xlsfinfo(filename); Then find the sheet ...

9 years ago | 1

| accepted

Answered
Hello there, I have a short question, as for some reason a for loop doesn't function.
Or without a loop: RT(RT > krit_out1(:).') = NaN; % >= R2016b: Auto-Expanding For older Matlab versions: index ...

9 years ago | 4

Answered
Permutations Cycles Counting ... speed up
A C-Mex has about the double speed of the VERSION 2: // VERSION 3 #include "mex.h" void mexFunction(int nlhs, mxArr...

9 years ago | 1

Answered
Deleting columns from matrix results in matrix being 3 times larger
Perhaps this helps: X(:, idx, :) = [] if idx concerns the 2nd dimension.

9 years ago | 0

| accepted

Load more