Risposto
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)-...

9 giorni fa | 0

Risposto
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...

9 giorni fa | 0

| accettato

Risposto
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...

9 giorni fa | 0

| accettato

Risposto
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....

10 giorni fa | 0

Risposto
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...

10 giorni fa | 0

Risposto
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 ...

10 giorni fa | 2

Risposto
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...

10 giorni fa | 0

| accettato

Risposto
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...

11 giorni fa | 0

Risposto
I wanna make a .mat file
help save

11 giorni fa | 0

Risposto
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...

11 giorni fa | 0

| accettato

Risposto
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...

11 giorni fa | 0

Risposto
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...

12 giorni fa | 1

| accettato

Risposto
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...

12 giorni fa | 0

Risposto
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...

13 giorni fa | 0

| accettato

Risposto
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(...

13 giorni fa | 0

Risposto
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, ...

14 giorni fa | 2

| accettato

Risposto
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,...

14 giorni fa | 1

Risposto
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])

14 giorni fa | 1

Risposto
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...

14 giorni fa | 0

Risposto
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...

15 giorni fa | 0

Risposto
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...

15 giorni fa | 0

| accettato

Risposto
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...

15 giorni fa | 0

Risposto
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 = ...

16 giorni fa | 0

Risposto
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...

16 giorni fa | 0

Risposto
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, ...

17 giorni fa | 1

Risposto
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...

17 giorni fa | 0

| accettato

Risposto
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...

17 giorni fa | 0

Risposto
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...

18 giorni fa | 0

Risposto
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...

18 giorni fa | 3

Risposto
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...

18 giorni fa | 0

Carica altro