Answered
Please explain how this matlab code works works and what it does
It can be almost impossible to figure out what undocumented code does, especially if we are not even told what it might be desig...

5 years ago | 1

Answered
Confidence interval of regression line
If the line has KNOWN coefficients, then a confidence interval is meaningless. If you want to compute confidence intervals arou...

5 years ago | 0

| accepted

Answered
matrix retrieving given certain determinant
You want to generate a random matrix with a known determinant? n = 7; % The size of the matrix Dtarget = 12; % My target deter...

5 years ago | 0

Answered
Matrices with unknown elements multiplication
Define the eements of the matrices in terms of symbolic unknowns. Then use solve to determine the unknown elements. Note that un...

5 years ago | 0

| accepted

Answered
How do i rotate a matrix over set of points.
No. You do not want to rotate a matrix. You have a list of points that lie in the plane, described as cooordinates in each colum...

5 years ago | 0

Answered
Is there a way to define a new built-in function?
As others have said, you need to start using your MATLAB search path. Once you put a file in your own personal search path, it w...

5 years ago | 1

Answered
Overdetermined Linear System with Binary-Solution
You CANNOT use lsqr on integer (binary) problems. Period. I don't know why you think you could do that. You cannot use intlinpr...

5 years ago | 0

Answered
Help solving directional cosines
A=[-130.342, -75, -55; -75, -130.342, 65; -55, 65, -130.342]; svd(A) That small number as the third element of the s...

5 years ago | 1

| accepted

Answered
How to calculate error of trapz() function?
This is not a question about MATLAB, but a question about understanding numerical integration, and perhaps a bit of statistics. ...

5 years ago | 1

Answered
Output result's format?
These are symbolic expressions you are showing. The format command has NOTHING to do with symbolic expressions. It applies only ...

5 years ago | 1

| accepted

Answered
Symbolic Inverse of large matrix
Sorry, but not really. It does not matter how big or how fast our computers get. There will always be somebody who wants to co...

5 years ago | 0

| accepted

Answered
How to buy a new toolbox with a subscription running
You can only get valid answers by contacting customer service. Answers is not that. So anything we tell you will be made by some...

5 years ago | 0

Answered
Systems of equations (help me please)
Congratulations! You have won the award for being the 1 millionth person to ask this question! The second place award is an all ...

5 years ago | 0

| accepted

Answered
I am not able to solve this equation using 'solve' function. Is there any other alternative?
polyA is not a polynomial. It is a mess that contains square roots of c and powers of c that go as high as the 6th power. Do you...

5 years ago | 0

| accepted

Answered
Using the fit() function to find an exponential gives me a straight line..?
Your real problem is the data does NOT support the model you want to fit. You can squeeze as hard as you want. That model is sim...

5 years ago | 3

| accepted

Answered
log-normal distribution
Rand does not "have" randn to make it anything. Randn is a completely different code. That they happen to be named similarly is ...

5 years ago | 1

Answered
How to generate 8 random 2D coordinates that do not duplicate?
Sorry. My first answer did not read your question carefully enough. You want 8 sets of integer coordiantes from the lattice in ...

5 years ago | 1

| accepted

Answered
Solve non-separateable equation
The usual name for this is an implicit function. There is no relationship where you can solve directly for y as a function of x....

5 years ago | 1

| accepted

Answered
How do I plot this curve?
Why would you think you need to use fsolve? Even without the use of fimplicit this is just a hyperbola. f = @(x,y) y.*(1 + y/2)...

5 years ago | 0

Answered
For loop checking if number is prime (without using MATLAB functions)
Your code does NOT work well. In fact, it has a serious bug in it. You are using a loop. EVERY pass through the loop, it sets y...

5 years ago | 0

| accepted

Answered
How do I check the compatibility of legacy MATLAB 2012b code with new versions of MATLAB?
Sorry. There is no tool that will scan through your code and automatically tell you what parts will run or not, at least not bey...

5 years ago | 0

Answered
Volume Segmenter App not available
This is almost certainly not a problem per se, except for people who have older releases of MATLAB, or who completely lack the I...

5 years ago | 1

Answered
How to know if a minimum found with Global Search is actually the Global minimum?
Bjorn and Stephen should be encouraged to make their comments into Answers. But let me expand on what they have both said. The ...

5 years ago | 1

| accepted

Answered
initial condition ODE45?
You cannot. That is to say, not directly. I suppose you could formulate it as a shooting method, in which case it becomes a nonl...

5 years ago | 0

Answered
A QR complexity question
(Good points made by Bruno. This answer tries to dive a little more deeply than Bruno spent the time to do, but I really don't c...

5 years ago | 2

Answered
Explanation of the following eval expression
Lol. Whoever wrote the code should learn to use MATLAB, as this is just an abuse of eval, for absolutely no good reason. For ex...

5 years ago | 2

Answered
simulate a markov chain including the absorbing state "death"
You won't always eventually die? While there are ways for that to not happen eventually, usually they are the plot of some movie...

5 years ago | 0

| accepted

Answered
Is this code efficient to generate the Lagrange polynomial?
Is your code efficient to generate something you should not be doing in the first place? Note that a Lagrange interpolating poly...

5 years ago | 0

Answered
Using fzero for intesection and "integral" for area calculation
g=@(x)exp((-x.^2)./2); h=@(x) x.^2-4.*x; x=linspace(-1,5,100); plot(x,g(x)); hold on plot(x,h(x)); You did that much cor...

5 years ago | 0

Answered
Guess for fsolve returns similar answer (heavily non-linear equations)
We don't see your equations. Almost certainly, they are pretty nasty looking. You tell us the exit flag was -2. That flag says ...

5 years ago | 1

| accepted

Load more