Respondida
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?...

más de 2 años hace | 1

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

más de 2 años hace | 0

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

más de 2 años hace | 0

| aceptada

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

más de 2 años hace | 0

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

más de 2 años hace | 1

| aceptada

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

más de 2 años hace | 1

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

más de 2 años hace | 0

Respondida
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^...

más de 2 años hace | 1

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

más de 2 años hace | 0

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

más de 2 años hace | 0

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

más de 2 años hace | 0

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

más de 2 años hace | 0

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

más de 2 años hace | 0

Respondida
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? ...

más de 2 años hace | 0

| aceptada

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

más de 2 años hace | 1

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

más de 2 años hace | 0

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

casi 3 años hace | 1

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

casi 3 años hace | 0

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

casi 3 años hace | 0

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

casi 3 años hace | 1

| aceptada

Respondida
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?

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 0

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

casi 3 años hace | 0

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

casi 3 años hace | 0

Respondida
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;...

casi 3 años hace | 0

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

casi 3 años hace | 0

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

casi 3 años hace | 2

Respondida
How to solve out of memory error when constructing sparse matrix
Remember that i and j and v also take memory. (222263280*4*2 + 222263280*8)/1024^3 So those three variables alone require 3.3 ...

casi 3 años hace | 0

Respondida
What is 5A?
The obvious seems clear, since I recall arithmetic. FiveA = [15 10 25 5]; I think you DESPERATELY NEED to do the basic Onramp ...

casi 3 años hace | 0

| aceptada

Respondida
Find the volume of the solid generated by revolving about the x-axis the region bounded by the curve y= 4/x^2+4,the axis, and the lines x=0 x=2
The question is now a year old, so I'll show how to solve it. @Mukesh chose to work with a different domain than the question as...

casi 3 años hace | 1

Cargar más