Answered
Will it be a good idea for MATLAB Answers provide functions enabling us follow/favorite a topic/question?
It surely could not be a bad idea if it were an option. Good would be measured by the eyes of a person who might use it. For ...

10 years ago | 0

| accepted

Answered
How to smooth a relation?
It looks like you have many main curves there. Regardless, I'd suggest using a Savitsky-Golay filter, as applied to each of x an...

10 years ago | 0

Answered
How to get critical values and P values of F statistic and T statistic?
Unless your goal is to somehow improve on what is already written, or you simply don't have those existing tools, then you shoul...

10 years ago | 0

Answered
I have written a code to assign each co-ordinate of matrix A(5 x 5) as A(1,1) = 1; A(1,2) = 2; and so on till A(5,5) = 25. But the code is giving errors.
The line: A(k,:) = (i,j); is not valid MATLAB syntax. Perhaps you wanted to write A(k,:) = [i,j]; I cannot know ...

10 years ago | 0

| accepted

Answered
Sensitivity study of eigenvalues?
I wrote a code called <http://www.mathworks.com/matlabcentral/fileexchange/22885-eigenshuffle eigenshuffle> some years ago, that...

10 years ago | 0

| accepted

Answered
Vectorization of a for loop for fast computational speed
Sorry, but "vectorization" will not be the panacea you desire here. And you are already using SOME things that would be perceive...

10 years ago | 0

Answered
Differentiation along horizontal?
There is no need to transpose the matrix. Just tell diff what dimension on which to operate. Look at the third input argument of...

10 years ago | 1

Answered
square root of a big number
As long as we can start with a uint64 number, this should work reasonably well: N = uint64(2025027714713048816); u =...

10 years ago | 0

| accepted

Answered
Matlab Gaussian Elimination Question
No. What you fail to understand is those two results ARE the same. The same at least, to within floating point trash. Adding, su...

10 years ago | 0

Answered
Profiling mfile usage history
I don't think that is something returned to you by anything in MATLAB, so you would need to go to the OS. You should be able ...

10 years ago | 0

Answered
Checking if an index has been used
help ismember

10 years ago | 0

Answered
Gaussian Elimination Script Help
Ok, I looked at your code. A serious MAJOR problem found. You never finished writing the code. I'll list the pertinent lines ...

10 years ago | 0

Answered
Plotting normal distribution with negative x range
When you call plot with ONE argument, it assumes that the x-axis is the integers, 1:numel(y). So, your expected x-axis would be ...

10 years ago | 2

| accepted

Answered
Symbolic simplify not cancelling fractions
Works fine for me, with nothing special done at all. Of course, I had to fix your mistaken syntax. (8*cos(t) - 8*cos(t)^3)/...

10 years ago | 1

Answered
Solve for the value of two variables that returns a desired function value in the shortest amount of time.
In the shortest time? That is impossible to answer, since not knowing your function, how can we ever know how it might be ac...

10 years ago | 0

Answered
How much a signal curves
In MATLAB, I would do this: n = (-5:5)'; A = [n.^2,n,ones(size(n))]; P = pinv(A); SGfilt = P(1,:)/2 SGfilt = ...

10 years ago | 0

Answered
FMINCON requires all values returned by user functions to be of data type double
I'm sorry, but what is your question? You state the answer already. "FMINCON requires all values returned by user functions t...

10 years ago | 0

Answered
[interp2] Different interpolation methods in each dimension.
Sorry, but while this could be faster IF you wrote it from scratch, it will probably not be so in practice, IF you tried to do i...

10 years ago | 0

| accepted

Answered
How to generate a matrix of all permutations of numbers ignoring repeats
Actually, there are factorial(x)*nchoosek(n,k) distinct ways to do your permutations. That can get quite large, and do s...

10 years ago | 1

Answered
Matlab is inconsistent when raising numbers to the zero'th power:
What you apparently misunderstand is the idea of operator precedence. There is a difference between these two operations: ...

11 years ago | 1

| accepted

Answered
a question on inner loops
Easy. for j = setdiff(1:M,i)

11 years ago | 0

| accepted

Answered
random generation of a matrix subject to a certain constraint
B is real, semi-positive definite (or non-negative definite) with a complete set of eigenvectors/values. Ws can always write ...

11 years ago | 0

Answered
Problem with Solve command
Solve does not come with EVERY copy of MATLAB, but only if you have the symbolic toolbox installed. Apparently you don't have...

11 years ago | 0

Answered
Why is the 'sum' function also outputting elements of my matrix?
Did you write your OWN function called sum? Type this on the command line: which sum -all If you have written a function...

11 years ago | 0

| accepted

Answered
Is Hilbert transform not defined for complex signals? In MATLAB, the function hilbert ignores if you give a complex sequence as input. Why?
There is no function that I can find called hilbert.m, as provided with MATLAB, written by by The MathWorks. I assume that yo...

11 years ago | 0

Answered
Matrix inverse with numbers and letters
This gets asked over and over again. Nothing stops you from trying it. The symbolic toolbox can do it, within limits. While t...

11 years ago | 0

Answered
how to find the max deflection and its position in a beam
To answer your question, I presume that the maximum deflection is actually a negative value. So why not compute the maximum of t...

11 years ago | 0

Answered
Get fsolve to solve an entire matrix of inputs
Just use solve, since you want to be able to specify which parameters are to be solved for. Fsolve will never return more than O...

11 years ago | 0

Answered
How can I code vector index plus
Code what? If n is an integer, then C(n) + C(n+1) does exactly that. Are you asking to form the sum of all consecutiv...

11 years ago | 0

| accepted

Answered
Find function with given set of x y z points
Sigh. This is the one millionth time this question has been asked. There are infinitely many functions that satisfy your goa...

11 years ago | 1

Load more