Réponse apportée
MatLab eig vs LAPACK
If I had to guess, you don't need to use it. A = randn(500); timeit(@() eig(A)) ans = 0.0800828164545 B = A + A'; timeit...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to solve 'Equation solved at initial point' with fsolve?
As is often necessary on a problem like this, it helps to look carefully at what you have. x = sym('x',[1 2]); mu_earth = 39...

plus de 3 ans il y a | 0

Réponse apportée
Optimization: Capacitated Facility Location Problem
First, what is the difference between the summation over i in a sum like this: sum(f(i)*yi)) and the dot product of two ve...

plus de 3 ans il y a | 1

Réponse apportée
im trying to solve a system of 4 nonlinear equations with 4 unknowns
x = sym('x',[1,4]) eq1 = x(1)+.17*x(1)-x(2)-x(3)-x(4) == 0 eq2 = (((x(3)^(1/2))*x(4))/x(2))-.465797 == 0 eq3 = 2*x(1)-2*x(2)-...

plus de 3 ans il y a | 0

Réponse apportée
Another question on eliminating for loops....
Try it. If you can't see ndgrid doing it, then look harder. :) (By the way, lower case l (L) is a really bad variable name to us...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to do piecewise linear approximation from x and y points?
x = [20 60 240 480 1440 2880]; y = [0.0278 0.1626 1.8126 4.006 18.2491 44.4084]; plot(x,y,'o-') You have only 6 data points...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How do I access an element of an array of equations
If x is symbolic, you CANNOT use it in a colon call. But in the end, you did not ask for a symbolic result, but a function of x....

plus de 3 ans il y a | 0

Réponse apportée
I want to build the square wave: build a 6 subplot figure to show the time domain, and use respectively 1, 3, 5, 10, 50, 500 frequencies.How can i achieve this?
Solve a problem that is too large for you to handle by breaking it up into small enough chunks to handle. Do you know how to u...

plus de 3 ans il y a | 0

Réponse apportée
How to get the numerical rank of the matrix in matlab?
To compute the numerical rank of a matrix, use rank. Surely that seems logical. And you even know about rank. Bu then you seem ...

plus de 3 ans il y a | 2

Réponse apportée
Function to solve an equation for a given variable
If it is symbolic problem, then it is trivial. Just assign those variables, subs them in, and use solve. WTP? If it is a numeri...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to identify the infeasibility from the set of equality and inequality constraints
You have a scalar problem? But then, you have TWO equality constraints? So a solution will exist only if BOTH equalities are s...

plus de 3 ans il y a | 0

Réponse apportée
I wanna make a .mat file
help save

plus de 3 ans il y a | 0

Réponse apportée
Problém with graph of implicit function
If you change the value of a, then the implicit function itself changes. So you MIGHT decide to use fimplicit3. But if you need...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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(...

plus de 3 ans il y a | 0

Réponse apportée
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, ...

plus de 3 ans il y a | 2

| A accepté

Réponse apportée
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,...

plus de 3 ans il y a | 1

Réponse apportée
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])

plus de 3 ans il y a | 1

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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 = ...

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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, ...

plus de 3 ans il y a | 1

Réponse apportée
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...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 3 ans il y a | 0

Charger plus