Problem with my non linear pendulum code
Why do you think there is a problem? The code runs fine. Are you worried that the editor tells you that essentially, t is not u...

10 dagar ago | 1

How is the polyarea function input order to receive correct results?
Yes. You do need to think about what you are doing. I'll create a quasi-triangular region as an example. px = [0, 1, .5, .49];...

11 dagar ago | 0

| accepted

How to change a column vector into a square a matrix?
This is something that I've sometimes been surprised that is not already a function in MATLAB, thus, to create a symmetric matri...

11 dagar ago | 3

| accepted

Matlab determinant equation solver
Just for kicks, I assume that you really have 792 such 3x3 problems. JUST USE A LOOP. Could you convert this into a cell array o...

11 dagar ago | 0

| accepted

For loop giving me wrong values
I tried to look through the code for a few minutes now, looking for something obvious. So then I downloaded your data, put your ...

12 dagar ago | 1

Assign values to intervals of matrix
Use MATLAB as it is designed to be used - as a language that works with vectors and matrices. A(:,3) = repelem(t1,580);

12 dagar ago | 1

| accepted

Dependent swarm size PSO
You could write your own PSO tool. But that would be your choice. And there is no assurance this will work better. And structuri...

13 dagar ago | 0

| accepted

Why doesn't Multistart converge to the optimal solution?
Sadly, there is NO method that can absolutely, positively insure the optimal solution is found. No matter how hard you try, I ca...

13 dagar ago | 1

Special? Not really. help diag

13 dagar ago | 0

Why doesn't matlab recognize my variables?
What is sketchy is the invalid MATLAB syntax you have created in multiple lines. When you write things like this: Q = 5 e (-...

13 dagar ago | 1

Integration of a derivative(arc length formula)
I have absolutely no idea what it is you are trying to do, because your code makes no sense. So instead, I'll just show you ho...

14 dagar ago | 2

| accepted

How do I set an integer condition for fmincon?
You cannot do this using fmincon. Period. fmincon is not designed to allow this class of condition. Use a different optimizer th...

15 dagar ago | 0

Genetic Algorithm Convergence problem: big range of best fit square errors
Is there any optimal set? No. If there was some optimal set of algorithmic parameters, do you think there is any reason they wou...

15 dagar ago | 0

ODE45 not working
One must wonder if the reason a parameter NEVER changes, is if the derivative is always identically zero. Then I look at the e...

16 dagar ago | 0

Out of memory Problem [Problem 2 , Project Euler (Sum of even Fibonacci numbers)]
Note that IF you are really trying to solve PE #2 (it has been a moderately long time since I was actively solving PE problems o...

16 dagar ago | 0

| accepted

Why I can't plot an implicit form of function including abs()?
First, you are tryign to do the wrong thing here: fimplicit(abs(y-x)*(1+y/x)^2==0); That creates a LOGICAL result. Then you as...

16 dagar ago | 0

| accepted

curve fitting and optimisation code problems for f(x)= a.*exp(-b./(x.^p)) to dataset
A serious problem with this is what I would suggest looks like almost two functions merged into one. Worse, the two "curves" at ...

17 dagar ago | 2

| accepted

Multi-precision linear programming
None in MATLAB. However, I there is some question as to you really need super high multiple precision support. Do you have data ...

17 dagar ago | 0

Random Numbers Generation - For Loop VS 3D Matrix
It really is impossible to know something like this, unless you have the code sitting there in front of you. And that is somethi...

18 dagar ago | 2

| accepted

solving PDE problem : Linear Advection diffusion equation problem
First, it looks as if you are using ode15s for no good reason. Typically, unless you have some initial expectation your IVP is a...

19 dagar ago | 0

| accepted

write this following matrix
Try this: n = 100; D = (diag(ones(n-1,1),1) - diag(ones(n-1,1),-1))/(2*h); You can also use spdiags. or sparse, or many other...

19 dagar ago | 0

| accepted

Finding all unique permutations of a set
First, lets see if your task is even possible to do. You would be surprised. Far too often people seem to think they have immens...

19 dagar ago | 0

How to get set of outermost points out of given data set
Has nobody answered you? Oh well. here goes. Part of the problem is you only showed a picture of your data. A picture may be wor...

20 dagar ago | 0

How can I define split-complex number?
You would need to create a custom class for the object, where you will then define how arithmetic is to be performed. That is, y...

21 dagar ago | 0

| accepted

Implementation of array of queues
Standard arrays must be rectangular. However cell arrays are the perfect solution. C = {1:3, 1:5,1:8} C = 1×3 cell array ...

21 dagar ago | 0

| accepted

How to find the nearest positive definite matix
You can always just download my nearestSPD function from the file exchange. (Note that it does come with a reference to how it w...

21 dagar ago | 0

How can i plot surfaces for a recursive function?
Being recursive is not relevant to anything material. As long as you can evaluate it, do so. For example, you might create an ar...

21 dagar ago | 1

vpa doesnt transform the roots of a polynomial equation to numerical results
You want numerical roots, for completely general k? Brute force is a problem, since those roots would still be a function of k. ...

21 dagar ago | 2

double summation of a matrix
Of course it does work to use loops. Therefore, your loops were not written correctly. :-) However, it is far easier to write th...

22 dagar ago | 0

| accepted