Answered
degrees of freedom chi2inv
This really should be asked on a different forum, as only barely about MATLAB, and a good answer requires teaching a class in st...

3 years ago | 0

Answered
error with the trapmf function
You wrote this: x1 = 0:1:25; y1 = trapmf(x, [0 5 15 25]) ; So you created the variable x1. Then you called the function trapm...

3 years ago | 1

| accepted

Answered
How to determine the relationship between two variables from a plotted graph
Walter is correct in everything said. My answer here is just to expand. Once something becomes no longer linear, what is it? F...

3 years ago | 0

Answered
Power method to determine largest eigenvalue and corresponding eigenvector had some wrong
I would claim you have two problems here. One is a pretty common mistake, the other more subtle. Do you understand that eig nor...

3 years ago | 0

| accepted

Answered
Magnitude of cross product
syms theta phi r = [2.*sin(phi).*cos(theta) 2.*sin(phi).*sin(theta) 2.*cos(phi)]; P=diff(r,theta); R=diff(r,phi); C = cross(...

3 years ago | 0

Answered
Trouble plottiing a trig function
Ok. You knew you had to use the .^ operator to raise the elements to a power, element-wise. There are also .* and ./ operators, ...

3 years ago | 2

| accepted

Answered
how to make a 3x3 matrix a 9x1 matrix?
The point to the answers you have gotten is if you want it to run across columns, then you can easily convert columns into rows,...

3 years ago | 1

Answered
RREF with unknown variables
WTP? Why not try it? syms a b c rref([1, 2, 3, a; 4, 5, 6, b; 7, 8, 9, c])

3 years ago | 1

Answered
Various functions depending on X
If the function is symbolic, then use piecewise. help piecewise Note that your function lacks definition, since you do not say...

3 years ago | 0

Answered
How can I fix my issue with regstats "design matrix has more predictor variables than observations"?
Get more data. Simple enough. Supose you want to fit a very simple linear model with say three independent variables. With a co...

3 years ago | 0

Answered
How to derive a function from 6 variables
Knowing which function to use, given 6 independent variables is terribly difficult to know. If you lack knowledge of a good nonl...

3 years ago | 0

| accepted

Answered
how to pass from x y z plane to toroidal coordinate?
You have a line in three dimensionas, and you want to find the equation of that line in a toroidal coordinate system? First, wh...

3 years ago | 0

Answered
Singular value decomposition method for solving least squares problems
Please stop asking this same question multiple times. If you are asking how to solve a least squares problem of the form A*x = ...

3 years ago | 0

Answered
Finding unknow of equation
I'll use syms here, because it displays things nicely. syms x y a b c d B=[0;0;x;0;0;y] C=[a;b;0;c;d;-2000] So B and C are V...

3 years ago | 0

Answered
Am I writing this exponential function the right way?
You need to learn about the dotted operators. They are used when you will be performing ELEMENT-wise squaring, multiplications, ...

3 years ago | 1

Answered
Interpolate Scattered Data on another mesh
But what is the problem? Using scatteredInterpolant, interpolate set 2 (x,y,z) using the data for set 1. Some of the points fr...

3 years ago | 0

| accepted

Answered
I want to solve this equation for Xp while I know all others parameters.
In almost all cases when you have a variable that lies both inside, and outside of a nonlinear function, like sin or cos, log an...

3 years ago | 0

Answered
MATLAB can't symbolically solve a definite integration
Not all problems you can write down have some nuce simple algebraic solution. In fact, almost all problems you can write down do...

3 years ago | 0

Answered
Best Practice: Many Functions relying on Global Variables?
By far the simplest is to just stuff all of your variables into one struct. then pass it around to anything that will need it. T...

3 years ago | 3

Answered
Cart2pol function: wrong output angle is produced when input angle is in degrees, any help??
Perhaps your problem is in the conversion of degrees to radians. I think you just took an old code you had written to convert po...

3 years ago | 0

Answered
how to solve ODE with variable coefficients?
You cannot use a numerical ODE solver, if you don't provide all of the coefficients. Numerical solvers like ODE45 work ONLY with...

3 years ago | 0

| accepted

Answered
Creating curved alpha hull, similar to R-package
How can you do what R does? You can write the code. You will not find this directly in MATLAB that I know of. (I'm the author of...

3 years ago | 0

Answered
how to find eigenvalues using the determinant ?
This is a generalized eigenvalue problem. READ THE HELP FOR EIG. If you pass in both matrices, it still computes the eigenvalues...

3 years ago | 2

Answered
How to solve this symbolic nonlinear equation
This is a common problem, for some parametric matrix, solve for the parameter that makes the matrix singular. And, effectively, ...

3 years ago | 0

| accepted

Answered
How do I generate all quadruplets?
You can't. Period. There are infinitely many such points. Can you generate infinitely many points? Can you store them all? Is yo...

3 years ago | 0

| accepted

Answered
how to Write a script that asks for a number n and nxn matrix with a Normal distribution with mean 0 and std 1?
Read the help for randn. Does it tell you how to generate a matrix of samples from that distribution? help randn

3 years ago | 0

| accepted

Answered
Hi every one. I have a moving point on the axes. How my point can move in this direction( look at picture)? Cause now it`s just moving from x 0 to x 3.6, idk what to do next
You will want to do this in a parametric form. That is, think about how x moves, as a function of TIME. Don't think about y as a...

3 years ago | 2

| accepted

Answered
How to find the y from given x on fit line?
It completely depends on how you perform the fit. For example, with the curve fitting toolbox, just do this: X = rand(10,1); Y...

3 years ago | 0

Answered
how to compress 15x15x8 dobule to 15x15?
How long have you been using MATLAB? You have asked 51 questions on Answers. But just today, you asked two trivial questions in ...

3 years ago | 0

| accepted

Answered
how can I do subtraction between two symbolic functions with different arguments?
syms X(alpha,beta) syms Y(theta) syms delta Y(delta) X and Y are symfuns. MATLAB understands that they can be evaluated fo...

3 years ago | 0

Load more