Answered
How to use a formula using a certain series to calculate pi?
Having made some effort, I'll give you a big hint. What you are being asked to do is compute the inverse tangent of THREE number...

8 years ago | 0

Answered
Find common data between two vectors
If you are looking for the longest common substring? Assuming the elements of A and B are integers, then use of my commonsubs...

8 years ago | 1

| accepted

Answered
Exponentiation Turns Values Into Zeros.
No, you cannot tell MATLAB to increase the accuracy of computation. Numbers are doubles. Or they are symbolic. Or you could use ...

8 years ago | 0

| accepted

Answered
Piecewise polynomial integration (ppint)
Just use fnint. x = linspace(0,2*pi,20); y = sin(x); pp = spline(x,y); ppcos = fnint(pp); fnplt(ppcos) <</ma...

8 years ago | 0

Answered
How do i hold a number from a randi
Well, if you've gotten to the point of knowing how to use randi, I might as well give you a hint. Dice = randi(6,[1 5]) ...

8 years ago | 0

Answered
random matrix with constraints:
Suppose I gave you ANY 6x4 matrix. Compute the sum of all of the rows. Then compute the sum of those sums. Clearly the result mu...

8 years ago | 2

Answered
How to solve Simultaneous Quadratic Equations?
These are not quadratic equations. The mere possession of a square in there does not make it quadratic. The possession of tan(x)...

8 years ago | 0

Answered
Can you use Batched partitioned nonlinear least squares to fit 5 parameters?
As the person who introduced the concept of batched partitioned nonlinear least squares here, I'll assume you are asking about u...

8 years ago | 0

| accepted

Answered
3D or 2D representation of a linear equation with 21 or more variables
21 variables. Do you have a 21-dimensional hyper-holographic monitor? Not possible.

8 years ago | 0

Answered
Solving normcdf for sigma
The symbolic toolbox does not understand normcdf very well. But fzero will work just fine. fun = @(sigma) normcdf(1.43,1.41...

8 years ago | 0

Answered
How to generate an array of poisson distributed 0s and 1s of a known lambda value?
If you will set a maximum value for the Poisson random variable, then it is not Poisson distributed, since that distribution all...

8 years ago | 0

Answered
I keep getting an error stating that fsolve has stopped because it has exceeded the function evaluation limit.
These equations are rather numerically nasty. So fsolve may well have problems. x = sym('x',[1 2]); F(1) = (24/(x(1))...

8 years ago | 0

| accepted

Answered
How to use polynomials after curve fitting 3D points?
Almost always when someone says this, they have tried to fit a high order polynomial. Then they copied the coefficients with abo...

8 years ago | 0

| accepted

Answered
How to simulate a coin flip experiment and count the number of changeovers?
Well, having posted your code, let me suggest the MATLAB way. simsize = 20; % 20 samples per simulation nsims = 10000; %...

8 years ago | 1

Answered
Three Matrix Multipiclation Resulting Nan Value
This has ABSOLUTELY NOTHING to do with the size of these matrices, which are actually pretty small. It has nothing to do with yo...

8 years ago | 0

| accepted

Answered
"Solve" function and "overly precise" parameters??
Look more carefully at what results. When g is fairly simple, i.e., g = 1.1; pretty((1/Mi)*((2/(g+1))*(1+ ((g-1)/2)*M...

8 years ago | 0

| accepted

Answered
How to replace the diagonal entries of a square matrix with entries from a vectore of equal length?
M = M - diag(diag(M)) + diag(v) or... M = M + diag(v - diag(M)) In either case, I killed the diagonal, then added t...

8 years ago | 16

| accepted

Answered
Why do I get different result even if they are mathematically equivalent?
Um, no. Not truly so. They look alike. But are they? x = -1; x^(2/3) ans = -0.5 + 0.86603i (x^2)^...

8 years ago | 1

| accepted

Answered
Intersection of two planes.
Let me explain in some depth. You have two non-parallel planes. So they will intersect in a line. Any point on that line is a...

8 years ago | 0

Answered
All combinations of two elements from a 3 by 7 matrix without repeating from the same column
If I presume that you only said you want a constraint on combinations from the same column, since you used that word more often,...

8 years ago | 0

| accepted

Answered
convert matrix into matrix with a repetitive pattern
doc repelem

8 years ago | 0

| accepted

Answered
How can be a 2D polygon of n sides can be exported as the coordinate data x,y?
P4 = nsidedpoly(4); P4.Vertices ans = -0.70711 -0.70711 -0.70711 0.70711 0.70711 0.70...

8 years ago | 0

Answered
Find the type of curve from the two points and the normal at those points known?
Sorry. You seem to have a vast disconnect between your hopes for what you want to get, and the mathematics for what you can achi...

8 years ago | 1

| accepted

Answered
finding intersecting points of two 3D bodies
I'm not sure why inhull would have been expected to work, as that is not the purpose of that tool. Are the objects convex at ...

8 years ago | 0

| accepted

Answered
spline approximation with constraints
There are several problems in what you are trying to do. The obvious one is that splines abhor singularities, and you have on...

8 years ago | 0

| accepted

Answered
producing a golay sequence or complementary sequence of length 256
Google finds this as one of the first hits when I tried a search. Seems like the place to start, since it does exactly that? ...

8 years ago | 0

Answered
Looking to find an equation
Just use fzero or vpasolve. WTP? Note that there will very likely be no analytical solution. But that is quite common. It is tri...

8 years ago | 0

Answered
Hi , How can i generate a pdf file in matlab with information from code ?
Just use publish. See that your comments will be included in the published file. Here is an example script that I just made: ...

8 years ago | 0

Answered
sorting a matrix to circularly shifted matrix in efficient way
Reduce the input matrix to TWO vectors. [2 0 0] and [1 1 0], or however many are required. Thus... [U,I] = unique(sort(inpu...

8 years ago | 1

Load more