Answered
How to draw perpendicular line from scatter points in 2-D plot
I would STRONGLY recommend you learn to use descriptive variable names. a? b? z? MATLAB does not charge more for you to use two...

5 years ago | 0

Answered
Solve function is unable to return the results of System of equations in the desired single number format instead of fraction ? help
Sure it is. You just need to convert the result from a fraction, into a floating point number. So either use double to create a ...

5 years ago | 0

| accepted

Answered
if statement with greater than and less than
This is a common shorthand notation in mathematics, thus A < B < C where we know that what is really meant is a pair of ...

5 years ago | 1

Answered
Is there a way to report/flag submissions on the File Exchange?
Best is to report them to the FEX admin. I'll do that for the ones you have shown. If you see other sustpect ones, and you just ...

5 years ago | 1

Answered
Finding curve length of vector r(t)=<2t, t^2, 1/3t^3> Given0<=t<=1
Just for kicks, I'll use my arclength tool, see how well it can do. t = linspace(0,1,100); X = 2*t;; Y = t.^2; Z = t.^3/3; ...

5 years ago | 0

Answered
Can someone help me with this function assignment
The name of the m-file must be MyTimeConversion.m, or MATLAB will not see it as such. You cannot have other functions in the sam...

5 years ago | 0

Answered
reshape matrix with variable length to vector
Look at the order the elements were returned. Do you know how the elements of a matrix are stored? DOWN THE COLUMNS. So when you...

5 years ago | 0

Answered
How to solve a differential equation with two unknown variables
This is a PDE. A partial differential equation. ODE45 CANNOT solve it, as it is not designed to solve that class of problem. (No...

5 years ago | 0

| accepted

Answered
diff function rearranges symbolic expression leading to non-vanishing terms
This is a floating point problem, but it comes when MATLAB takes your constants and turns them into symbolic numbers. Do you see...

5 years ago | 0

Answered
what kind of program is suitable for developing with simulink
This is very vague and confusing as a question. Are you asking what types of problems do people tend to solve using Simulink? P...

5 years ago | 0

Answered
curve fitting tool plot is different from my plot
I predict there will be no problem here. So let me see what you MAY have done wrong. I say may, since we do not see how you crea...

5 years ago | 1

Answered
Are there any way to execute same program multiple times?
Um, you use a loop. This is a tool that allows you to execute the same code as many times as you wish. But if you are changing ...

5 years ago | 0

Answered
Using a loop to replace spaces for underscore
Ye gods, that is a complicated way to solve a job poorly. Sorry, but it is. Two lines, assuming you want the result in outstring...

5 years ago | 0

Answered
How to print 0 without a negative sign in the front? Everytime I want to print 0 it prints -0.000.
That minus zero is NOT truly zero. It is just a tiny number that is slightly less than zero, but when rounded to only 4 digits f...

5 years ago | 1

Answered
How to set which part of the code to comment using a variable?
NO. You do NOT want to comment out code programmatically. That will NOT be faster, even if you can find a way to do it. Your pro...

5 years ago | 0

Answered
ERROR Not enough input arguments.
You DON'T "run" a function. Run applies to scripts, and soon you will almost forget the run command ever existed, or so I hope. ...

5 years ago | 0

| accepted

Answered
I'm plotting a solution to a PDE using surf but the graph turns out wrong?
Do you understand that the series you show is not the same as what you wrote in code? Where did the sin term go in your code? W...

5 years ago | 0

| accepted

Answered
Solve a Set of Equations with Constraints and Interchangeable Varaibles
I think you are worrying about some magic algorithm, when simple linear algebra will suffice. Yes. LINEAR algebra. Each equatio...

5 years ago | 1

Answered
how to find area under the curve ?
Easy. Just use trapz. help trapz

5 years ago | 0

| accepted

Answered
Confusino regarding statistical tests for given distribution
It looks FAIRLY normal. But you have a whole crapload of data. It needs to look more normal than that. When you have a lot of da...

5 years ago | 0

Answered
How to do curve fitting by a user defined function
How far out do you want to extrapolate? This curve does NOT look like a sigmoid, because a sigmoidal curve will go flat at each ...

5 years ago | 0

| accepted

Answered
non continuous double integration
Ok, now that we understand the question, it is easy. Just use trapz, TWICE. To apply the trapezoidal rule, you will create a ma...

5 years ago | 0

| accepted

Answered
How do I change the position of the axes permanently?
There are some defaults you can set as defaults, but XAxisLocation and YAxisLocation do not appear to fall under the list of thi...

5 years ago | 0

Answered
How to perform Newman Girvan community detection algorithm in Matlab
My gut would have said probably not. But then Google is our friend. Why would you not look? Surely a 10 second search was easier...

5 years ago | 0

Answered
How to plot a 3D graph?
This is a perfect problem for a tool like ezsurf. Z = @(X,Y) 5 - sqrt(1 - X.^2 - (Y - abs(X)).^2).*cos(30.*(1 - X.^2 - (Y - abs...

5 years ago | 0

| accepted

Answered
How to calculate roots for multiple polynomial equations simultaneously i.e. without iterating over them one by one
In fact, the simple answer is YES. It is trivial. No loop required. You have a set of QUADRATIC EQUATIONS!!!!!! Surely you lear...

5 years ago | 0

| accepted

Answered
Fit Curve to a "C" shape
A spline produces a FUNCTION, SINGLE VALUED. That is, for any x, it is assumed there is a single y. Is that the case for you? NO...

5 years ago | 1

| accepted

Answered
Solving a complex equation with all real answers
I hope this is not homework, because it is almost too simple. At the same time, it has an interesting twist. I still fear it is ...

5 years ago | 0

| accepted

Answered
How to find absolute maximum value of (x*(x-.25)*(x-.5)*(x-1))
You are mixing numerical functions with symbolic tools. The two do not mix that well. So just pick ONE, and stay with it. For e...

5 years ago | 0

| accepted

Answered
Getting the equation of a line
You did the fit, with the estimates of the coefficients in p. p is a vector, of length 2. The line equation is simple. y ...

5 years ago | 1

Load more