Answered
Can Matlab give me a disturbance randomly from a% to b% of a number?
Do you know how to generate uniform random numbers in an interval [x,y]? This is in the help for rand, so you should know, or be...

10 years ago | 1

Answered
Separate the digits in a hex number
If you want the digits as an index into a table, then since indexing is 1-based in MATLAB, you want 'A' to map to 11, '9' maps t...

10 years ago | 1

Answered
natural spline, unmkpp gives 'wrong' answer
Well, it gives the right answer, to a different problem than the one that you think you posed. :) So first of all, if you rea...

10 years ago | 2

| accepted

Answered
3 Equations with 3 unknowns
On a problem like this, there is almost certainly NO analytical solution. The system will effectively reduce to something equiva...

10 years ago | 1

Answered
help for subs and sym commands ???
Why MUST A be a double? Did you not create it as symbolic? Even though the result is a "number", it can still be stored as a sym...

10 years ago | 0

| accepted

Answered
M by M matrix
If you are a complete novice, and have no cue how to do something like this, then why are you not reading the getting started tu...

10 years ago | 0

Answered
how to make the main diagonal of K are alternatively 2 and -2’s
So you want to create a tridiagonal matrix, with the main diagonal alternating +/- 2, and the sub and super diagonals alternatin...

10 years ago | 0

Answered
Is it possible to develop an equation from the data using MATLAB?
There are an infinite number of ways to predict any set of values like that you give. So this means you cannot get THE equation ...

10 years ago | 0

Answered
How to back interpolation to find x from z and y?
Is there something already written in MATLAB to do this? No. Given that your problem is not terribly common, it would be unexpec...

10 years ago | 1

Answered
Get a set of 10000 unique random 2-D coordinates
Easy enough. Two lines of code, if you don't count that I defined N and Asize to make this somewhat general. N = 10000; ...

10 years ago | 0

Answered
Is it possible to calculate arc lengths in image stacks when the voxel dimensions are anisotropic?
I don't see the problem. Convert the linear indices back into subscripts. help ind2sub Then scale by the respective size...

10 years ago | 0

| accepted

Answered
Interpretation of output of solve()
You have a system of two equations in two unknowns, but with coefficients that are also symbolic. Usually this is a system that ...

10 years ago | 0

| accepted

Answered
How to create a m*n matrix with 0,1 entries?
Did you say random until we had to prod you? :) The requirements imply that m<=n. A = eye(m,n); A(randperm(m),randper...

10 years ago | 2

| accepted

Answered
Use of Circshift command : possible bug.
Funny, that is NOT how the documentation describes it. Here is the pertinent section: B = circshift(A,[1 -1]) % circularly ...

10 years ago | 0

| accepted

Answered
Genetic algorithm slowed down in the successive generations
You want us to improve the speed of code that we cannot see, where we have no access to the code? The crystal ball tells me t...

10 years ago | 0

Answered
Matlab giving incorrect graph for exponential function
No. Sorry, but you have not written a function that has the properties you claim. In fact, I have a funny feeling that what you ...

10 years ago | 0

Answered
Parameter estimation using nonlinear regression in Matlab
I would change the wording some. The parameters of the emissions function are estimated using the nonlinear regression metho...

10 years ago | 0

Answered
Rational power of a positive definite matrix
Sometimes the answer is just "simple". simplify(f) ans = [ 0, 0] [ 0, 0] Symbolic results are not always return...

10 years ago | 2

| accepted

Answered
I don't understand why a function is taking more than an hour whereas its sister function is taking only 4-5 minutes
The two functions are identical as far as I can see except for their names, and a few lines with one more spare space character,...

10 years ago | 0

Answered
Create a fitting of a curve knowing points and tangents
Simplest is to use my <https://www.mathworks.com/matlabcentral/fileexchange/24443-slm-shape-language-modeling SLM toolbox> . I'd...

10 years ago | 0

| accepted

Answered
How to divide the parameters' ranges into subintervals?
So, you have how many parameters? fc*Rc*Nc0*exp(Kgr*t)+(fi_Ri*(exp(-di*t)*(Ni0*di-Nc0*ai+Kgr*Ni0))/(Kgr+di))+(Nc0*ai*exp(Kg...

10 years ago | 0

| accepted

Answered
fminunc not giving the correct results
The point about writing bug-inducing code as you are writing, is that you tend to create bugs. Happens very easily with such cod...

10 years ago | 0

| accepted

Answered
Solving system of equations using Lu Method and "NaN" results through final matrix
Your equations form a singular system. Just wanting a solution to exist does not mean there is a solution to all systems of equa...

10 years ago | 0

Answered
The SVD for a large nonsingular square matrix includes a zero. Any ideas what's going on?
It is not a numerically singular matrix. It is not hugely well conditioned, because the range of singular values is moderately l...

10 years ago | 0

| accepted

Answered
How do I fit two power law varying independent variables ( X1 and X2) in the form Y= Constant * X1^n1 * X2^n2. Appreciate the solution with an example for simple data
As dpb says, the curvefitting TB allows you to fit that model. If you lack that TB, then you can use other tools, like the optim...

10 years ago | 0

Answered
Clustering evaluation with Silhouette extremely slow
Your computer is not infinitely large or infinitely fast, unless of course, you are on TV or in the movies. Then anything is com...

10 years ago | 1

| accepted

Answered
Why is Simulink giving wrong result after some basic conversion from double to uint16?
This is just floating point arithmetic, basic and simple. http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html N...

10 years ago | 0

Answered
How to get a relationship equation in between variables of a multi-physics problem?
Sorry, but NO. It simply is not possible to know the underlying equations that govern a general nonlinear system, merely from so...

10 years ago | 0

Answered
Simple function on each cell of a cell array using data within the cells
Why did cellfun not work? Why would this not do what you have asked? fun = @(X) max(X(:,3))/max(X(:,2)); cellfun(fun,A) ...

10 years ago | 0

| accepted

Answered
how to use for loop by adding the new element in vector
This is something you do not want to do. Why not? because the very next time you ask a question on Answers, it will be a frantic...

10 years ago | 2

Load more