Answered
Checking repetition of random data
Do not create a list of variables called T1, T2, ... See <https://www.mathworks.com/matlabcentral/answers/57445-faq-how-can-i-cr...

9 years ago | 2

| accepted

Answered
cumsum restarting at 0 column-wise
Another short solution: In = [0 0 1 0 0 1; 1 1 1 1 1 1; 1 1 1 1 1 1; 0 1 1 0 1 0; 1 1 1 1 1 1; 0 0 1 0 0 1] Out = In; ...

9 years ago | 1

Answered
why this error ???? >> [w, b]=neural_1(0.01) Error using * Inner matrix dimensions must agree. Error in neural_1 (line 23) a(i)=hardlim(w*p(i,:)'+b);
The message means, that |w| and |p(i,:)'| do not have matching dimensions for a multiplication. Look how these variables are def...

9 years ago | 0

Answered
Multi-threaded Mex functions in the FEX
A new submission: <http://www.mathworks.com/matlabcentral/fileexchange/38034-mexthread>. Unfortunately: Note: this requir...

9 years ago | 0

Answered
I want to transfer strings in an array to another array
AB1=0; for aa = 1:BoxA ... AB1+1; % This statement does nothing! AB1 remains 0 wordsAB(AB1...

9 years ago | 0

| accepted

Answered
How do I make Taylor Series function for Sin(x)
I just based this with the sample Taylor series for cosine. * You need the sine, not the cosine. * 5*10^-11% is 5e-13. * T...

9 years ago | 0

Answered
find the distance from a point to a plane (known two vectors)
No, we do not know that 2 vectors can create a plane. If these two vectors are used to define the normal vector of the plane, yo...

9 years ago | 0

| accepted

Answered
Using MEX routines while running multiple instances of MATLAB
If you run multiple instances of Matlab, each one uses its own _copy_ of the Mex functions. This means, that you cannot e.g. del...

9 years ago | 0

Answered
Could anyone help me to fix the issue
Start with cleaning up your code 1, because it is weird. Replace: if N==3 else a(idx)=[] end by the smarter: ...

9 years ago | 0

Answered
index must be a positive integer or logical.
You access the indices x-1, y-1 and x+1, y+1. Then replace: for x=1:size(thinned, 2) for y=1:size(thinned,1) by: ...

9 years ago | 0

| accepted

Answered
Are annotations supported in uifigure objects?
I asked an internet search engine for "Matlab annotations appdesigner" and the first hit is <https://www.mathworks.com/help/matl...

9 years ago | 0

Answered
How to convert matrix into image ?
Is hard to answer this, because as far as I understand, there is no problem at all. Images *are* matrices, so what exactly is th...

9 years ago | 0

Answered
Selecting radio button resets GUI [GUIDE, R2017b]
Then the callback of the radio button contains some code, which initializes the contents of the GUI. Without seeing the code, we...

9 years ago | 0

| accepted

Answered
Manipulating arrays within a cell array
% Create some test data: (your code) dxs = 0:5e-06:0.002; nCell = length(dxs); xs = cell(1, nCell); % Pre-allo...

9 years ago | 1

| accepted

Answered
why we want to use matlab for fingerprint enhancement Is it the best software for fingerprint enhancement?
You cannot use Matlab to enhance finger prints at all. Finger prints cannot be enhanced by anything, but all you can do is to en...

9 years ago | 1

| accepted

Answered
cant mutplaye matrix by vector
Your |A| is 2x2 matrix and |x| is a 2x1 vector. Then: x(:,i+1)=t(i)*A has a 2x2 matrix on the right and a 2x1 vector on ...

9 years ago | 0

Answered
Get IP address over a Edit box
You can use a standard edit box and perform the checks in the callback, e.g.: function EditCallback(hObject, EventData, han...

9 years ago | 1

Answered
How can I input an image in GUI, coming from anywhere in the computer?
Please read the <https://www.mathworks.com/help/matlab/ref/uigetfile.html documentation of |uigetfile|>, if you have a correspon...

9 years ago | 1

| accepted

Answered
Finding location of an exact match in a string
List = strfind(str, '1.1.2'); Bad = strfind(str, '.1.1.2'); Match = setdiff(List, Bad + 1); But this fails for "11...

9 years ago | 0

Answered
Summing arrays within a cell array.
What about a simple loop? S = 0; for k = 1:numel(C) S = S + C{k}; end You can check if a vectorized code is f...

9 years ago | 0

| accepted

Answered
How do I access hex values stored in a char in matlab?
The output types of DataHash are: hex, HEX, double, uint8, base64. You could specify the wanted output type at calling DataHash....

9 years ago | 0

| accepted

Answered
deleting values from an array
|setdiff| replies all elements of a vector, which do not appear in a second one: R3 = setdiff(R3, smallerArray); Or ...

9 years ago | 1

| accepted

Answered
Sum of Multiplication of column values in cell array
It is much easier to work with multi-dimensional arrays instead of nested cells. The cell arrays require loops for numerical ope...

9 years ago | 0

| accepted

Answered
how to change the value of X in repmat
You are free to change x, so what is the problem? x = 2; for k = 1:10 if k = 3 x = 4; end y = repm...

9 years ago | 0

Answered
I need to where this coding is wrong? i am not able to detect the error.
unction definition is not permitted in this context In older Matlab versions (< R2016b, as far as I remember) functions can...

9 years ago | 0

Answered
MATLAB crashing access violation error
Please read and cosider this part of the message: If this problem is reproducible, please submit a Service Request via: ht...

9 years ago | 0

| accepted

Answered
how to use values from struct in short way ?
Well, yes: Use a nicer name for the struct: V(1).P_out_sepic = 100; V(1).V_desire = 18; V(1).R = V(1).V_...

9 years ago | 0

Answered
how can replace randi instead randint?
Do you mean |randint| from the Communications Toolbox or is this from Octave code? I assume, for both the answer is the same...

9 years ago | 1

| accepted

Answered
R[1;-1] how i write the program in matlab for random selection between 1 and -1
V = 1 - 2 * randi([0,1]) or V = 1 - 2 * (rand >= 0.5)

9 years ago | 2

| accepted

Answered
How to concatenate these matrices where the below matrices are formed out of permutation?
Do you want the unique set of vector of length n, which contains k 1's and the rest is 0? Then use |nchoosek| to obtain the *ind...

9 years ago | 0

Load more