Answered
suggestion: please put an option to display variable data type in head function
This is not even a question. Answers is not a place to post feature requests for MATLAB. Answers is entirely composed of volunt...

6 years ago | 0

| accepted

Answered
Find the area of the regions enclosed by the curves y=x^2-2x, y=x.
You know the x locations of the two points where the curves intersect. Is the area not just the integral of y2-y1 between those...

6 years ago | 0

Answered
Help me find the eigenvalues for the five interior vertices of the differential equation with the polynomial method
I've never heard this called "the polynomial method". And if your ODE was only slightly more complicated, then the result would ...

6 years ago | 1

| accepted

Answered
Since the matrix is near to singular I have tried pinv to solve but getting too deviated answers. Can you please let me know if there is any other way to solve the equations
So what can we say about the solution? David and Walter have both told you the matrix really is singular. A singular matrix will...

6 years ago | 1

Answered
I need general MATLAB bvp4c code for study .
Then you are in luck. bvp4c is already available as part of MATLAB. What is the problem? Why do you say you need it? You already...

6 years ago | 0

Answered
roots() function does not give exact roots
What it seems is people have not explained the "cause" of the problem as seen. format long g roots( [1 -3 3 -1] ) Remember th...

6 years ago | 3

Answered
random numbers in Matlab 2009
There is no alternative, since rang does not appear to be a MATLAB function, nor was it ever a MATLAB provided function. I also ...

6 years ago | 1

Answered
Set Limits for x in optimization using fminunc
If you have fmincon, then you also have fmincon so there cannot be a problem. This is not a question of how to get fminunc to so...

6 years ago | 0

Answered
How can I solve a problem using Constrained Nonlinear Regression?
Sorry. lsqnonlin cannot handle general equalty or inequality constraints. Only bound constraints, and while you do have bound co...

6 years ago | 2

| accepted

Answered
Solving non linear system of equations
Are theta_rotor, theta_stator, and u_axial all known values? If not, then no, fsolve cannot solve it. But if we assume those are...

6 years ago | 1

Answered
Integrating without using the symbolic toolbox
This is an arc length integral. Apparently you wish to compute the length of that curve in the plane, with x going from 0 to pi/...

6 years ago | 1

| accepted

Answered
Trying to solve this equation exp^(-((2.*n+1).*pi/2).^(2)*t)/(2.*n+1).^2 where n varies from 0 to infinity and the final equation is equated to zero to get value of 't'
First, exp is a function. Use it like this: syms n t exp(-((2.*n+1).*pi/2).^(2)*t)/(2.*n+1).^2 That presumes your parens were...

6 years ago | 0

Answered
sinh solver and numerical solution
One mistake in what you are both doing: Do not use == there to form equ1. Just subtract off the right hand side constant. The =...

6 years ago | 0

Answered
Defining a Variable Ranging from One Value To Another
You really need to read the basic tutorials. You cannot define a variable that is restricted to live in a specific interval. Ar...

6 years ago | 0

| accepted

Answered
Error in syms x
Did you either edit the function sym, or create a function or script of your own by that name? This will tell you if you created...

6 years ago | 0

Answered
Can the script detect the version of MATLAB on which the script run?
WTP? A = ver('matlab') A = struct with fields: Name: 'MATLAB' Version: '9.9' Release: '(R2020b)' ...

6 years ago | 0

Answered
reshape function with index 1
Reshape worked perfectly. In fact, you never had to do any reshape at all. Why is that? Because ALL arrays in MATLAB are assu...

6 years ago | 0

| accepted

Answered
For loop outputs into Row Vector
You don't say the value of n there. So I'll choose some value. Next, you need to store s in a form where it will be represneted...

6 years ago | 0

Answered
Problem with steps, limits and symbolic variable
Use symsum. syms n limit(symsum(2*n-1,0,n)/(3*n^2),inf) As you can see, I used symsum to compute the sum. Then divide by (3*n...

6 years ago | 0

| accepted

Answered
Creating L points with uniform spacing d?
You want to create a vector x, that contains exactly L points, with a uniform spacing of d, and that starts at 0. Trivial. Yes, ...

6 years ago | 2

| accepted

Answered
Generate a random decimal number between 0 and 1
So why not try rand? When you have a problem in MATLAB, use tools like help and lookfor to learn how to solve them. For example...

6 years ago | 2

| accepted

Answered
Problem with twodimensional equidistant lagrange interpolation
Sigh. 2d Lagrange? You do realize that some time after developing Lagrange interpolation, Lagrange died? There must be some caus...

6 years ago | 0

Answered
Sum of elements in 2D matrix greater tha 150
Time to learn to use MATLAB as it is designed to be used. value = sum(R_10M(R_10M > 150)); One line. No loops are necessary.

6 years ago | 3

Answered
Determine if a coordinate is on a trajectory path?
You COULD use the distance2curve tool I have posted on the file exchange. Since this is certainly for homework, you may or may n...

6 years ago | 0

Answered
Gaussian distribution with sum 1
Is the goal here to generate a set of random numbers which are apparently normally distributed, but with a sum of 1? Or is the g...

6 years ago | 1

Answered
How to extract coefficients from from curve fitting tool?
Simply enough. In fact, they ARE stored in the workspace. They are just not returned as separate variables. And that is a good t...

6 years ago | 4

| accepted

Answered
newton's method to solve nonlinear equation
Is there a good reason why you initialized dx to be zero? Do you see that immediately after that, you start a while loop. What ...

6 years ago | 0

| accepted

Answered
how to type sin^2(x) instead of sin(x)^2
That is just MATLAB syntax. You can want it to be different, but you really have no choices. When you use a language, you need t...

6 years ago | 0

Answered
How to solve the below equations for unknowns with equal and inequality constraints?
First, LEARN TO USE MATRICES!!!!!!!!!!!!!!!!!!!!!! LEARN TO USE VECTORS!!!!!!!!!!!! MATLAB is a matrix language. Don't define ...

6 years ago | 0

Answered
Is there a matlab plot of stacked circles to illustrate probability of outcomes/events?
You could create one. Would it be difficult? No. But to be honest, I would see that plot as a superb way to lie with statistics....

6 years ago | 0

Load more