Beantwortet
i was calculate using gauss jacobi method with 4x4 matrice, why does NaN appear? what should i do?
You write a function that allows you to pass in A and B, but then you define A anb B in the function? Sigh. I think you do not u...

mehr als 2 Jahre vor | 0

Beantwortet
Graphing changing constants using for loops
Why do you think it is not? Ok, there are multiple problems in your code. First, maybe I should ask what you think this line do...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Best practice: should a function return a row vector or a column vector
Let me disagree with a basic assumption of your question, in that there must be some best practice at all on this. Instead, I'll...

mehr als 2 Jahre vor | 2

Beantwortet
I don't understand why this script is outputting imaginary values
Hint: the log of a negative number is imaginary. Hint: The sqrt of a negative number is imaginary. Do you take logs in there?...

mehr als 2 Jahre vor | 1

Beantwortet
I need help figuring out the mistake in my function approximation
Avoid the use of the normal equations as you used, i.e., this crapola that you called the least squares method. Backslash is jus...

mehr als 2 Jahre vor | 0

Beantwortet
quadratic curvature doesn't went smoothly
load steam % Fit a first degree polynomial to the data. [p s]= polyfit(x,y,2); y1=polyval(p,x); % PLOTTING DATA plot(x,y,'o...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
surf for n-dimensional cartesian matrix
You cannot do so. That makes no sense at all, sorry. You actually have a FOUR dimensional problem, thus W(x,y,z). This is beca...

mehr als 2 Jahre vor | 0

Beantwortet
problem with symbolic factorization with two symbols
That you want to see a simple set of factors is not relevant. You essentially need to obtain the roots of this cubic polynomial ...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
fmincon: optimize till nonlinear condition is false
It does not just skip" the interval. It probably never saw it. An optimizer does not plot your function. It has no clue what it ...

mehr als 2 Jahre vor | 1

Beantwortet
Save text of script in .mat file?
Is it really a common problem? Not that I've ever seen any need for in 35 years of MATLAB use, nor in any question I can recall ...

fast 3 Jahre vor | 0

Beantwortet
The function ''vpasolve'' cannot find a solution with specified range even if its option 'random' was set to true, however the specified range does include 1 solution.
d1=-8;d2=-1;d3=6; t1=2.2187;t2=1.2392;t3=1.4223; v=6.038;a1=v*t1/2;a2=v*t2/2;a3=v*t3/2; c1=d1/2;c2=d2/2;c3=d3/2; b1=sqrt(a1^...

fast 3 Jahre vor | 1

Beantwortet
Printing a calculated function.
You CANNOT. At least, given only the vector of values, there are infinitely many possible functions that may have generated them...

fast 3 Jahre vor | 0

Beantwortet
Finding Solution to Inequality in Matlab
Simple enough. I'll just work with eqn6 here. syms tau beta lambda theta Solx eqn6 = (1-tau)*(1-theta)/((1-beta)*(1-lambda))> ...

fast 3 Jahre vor | 0

Beantwortet
How to create loop for gaussian quadrature
What has any of this to do with a loop anyway? There are no loops seen. You have hard coded what appear to be some basic Gauss-L...

fast 3 Jahre vor | 0

Beantwortet
Solving an initial value problem when one of the initial values is unknown
Simple enough, since this ODE has an analytical solution, even without any boundary conditions specified. (If the ODE did not ha...

fast 3 Jahre vor | 0

Beantwortet
Find files path location and removal.
I think I understand what you have done here, but I may be wrong. Never store files in the MATLAB toolbox directories. NEVER do...

fast 3 Jahre vor | 0

Beantwortet
creation of a circular plane passing through three nodes and for central node
It does not pass through those other points, because ... your code is wrong. Seems simple enough. What did you do incorrectly? ...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Is there a way to make matlab faster?
We don't know if you just want it to run faster. After all, everybody wants their code to execute in zero time on an infinitely ...

fast 3 Jahre vor | 1

Beantwortet
How do I get largest distance between two rows in an nx3 matrix?
As long as there are not too many points, pdist2 will work, and be easy to use. Just choose the largest of all distances found. ...

fast 3 Jahre vor | 0

Beantwortet
Outer product of two 512*512*300 matrices
Since there has been no response to my request for clarification... The request was for an outer product. An outer product is a...

fast 3 Jahre vor | 1

Beantwortet
Finding a way to cleanly show double data points in a plot
You want to show two different points at different locations on the x axis. But currently you have them with the same values for...

fast 3 Jahre vor | 0

Beantwortet
Matlab function gives 'ans=0' answer problem
First, you need to understand a fundamental feature of MATLAB. Suppose we call ANY function? It need not be one you wrote yours...

fast 3 Jahre vor | 0

Beantwortet
How do we test for infinite series convergence or divergence in MATLAB
I suppose with some effort I could find a series where convergence is not known. But it is early in the morning, and mental effo...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
how do i use two varaibles with values of somewhere from 1 to 9 to make a 2 digit number
What if you added them together? Maybe multiply one of them by 10 first? What would that do?

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to make change in the algorithm to start and end at a same point?
Your problem is, you want to force the code to return a tour that starts at point 1, and ends there. And that is where you are W...

fast 3 Jahre vor | 0

Beantwortet
Converting from syms to double
We don't see what is in that variable. But... If you cannot convert it to a double, then it is not a number. It has some symbol...

fast 3 Jahre vor | 0

Beantwortet
different time executions........
And you are surprised, because? Did you xpect exactly the same amount of time taken, EVERY TIME, to within a millisecond? Yes,...

fast 3 Jahre vor | 0

Beantwortet
ExB drift velocity code equation
I might guess that what you really want is to divide by the square of the norm of B. NOT by the elements of B squared. E = 0.1;...

fast 3 Jahre vor | 0

Beantwortet
why did the "text" function stop working while creating a new section in my live data
Whenever a function "stops working" you need to see if you have created a variable named text, or another function or script by ...

fast 3 Jahre vor | 0

Beantwortet
How to solve this equation?
As I see it, from your question, I think people have been missing the point. As has been said, there are no real solutions for s...

fast 3 Jahre vor | 2

Mehr laden