Answered
Solving constrained optimization problem
No problem. Build the matrix A. There is no need to transpose the A_i submatrices, then transpose the result again. Just learn t...

4 years ago | 1

| accepted

Answered
I am using fsolve. "fsolve stopped because the last step was ineffective. However, the vector of function values is not near zero, as measured by the value of the function to"
Um, what is not clear? fsolve did not find a solution to your problem. Not all systems of equations have solutions. Even if the ...

4 years ago | 1

| accepted

Answered
unable to run pinv (Moore Penrose) with accuracy limit
What do you think the 1e-4 applies to? dq=double(pinv(X)*(rGoal-r0),1e-4) Do you think this is a tolerance for pinv? If so, th...

4 years ago | 0

Answered
how can i calculate fourier?
FOURIER is a function that is part of the symbolic toolbox. If you do not have that toolbox, then you could not use it. However,...

4 years ago | 0

Answered
Finding a zero meaned matrix vertically and horizontally.
If you are writing a PCA code for yourself, then yes, you want to mean subtract the array. (If you are just going to use the exi...

4 years ago | 1

| accepted

Answered
With two different initial values I am getting two different answers in fsolve. How to decide which one is more reliable?
When you have different variables with such a large discrepancy in magnitude, the problem is not which solution is more correct,...

4 years ago | 2

| accepted

Answered
Feature Request: Add H.264 encoding to "UAV Toolbox / Simulation 3D / Video Send" block
Sorry, but Answers is not the place to post feature requests. We are not technical support for MATLAB. We are just a set of volu...

4 years ago | 0

| accepted

Answered
Finding roots of a polynomial function
The best way to solve this specific problem is to transform it, in the form of a non-dimensional variable. That is, we see the c...

4 years ago | 1

| accepted

Answered
Find the minimum of a function on a plot and where it occurs on the x-axis
You have a function of one variable. Perhaps you should spend some time reading about tools like fminbnd, or even fminsearch. Ei...

4 years ago | 1

Answered
solve nonlinear equations with unknown variables in matrix format
As an alternative way to understand why there is no solution to your problem is to look at your equations. eq1 = (x+y)*cos(z)-a...

4 years ago | 0

| accepted

Answered
How to get the mean of a staircase graph?
You don't give your actual data, just a pcture of it. Yes, sometimes a picture is worth a thousand words, but pictures are not w...

4 years ago | 0

Answered
how to write fraction function in complex plane by using matlab
MATLAB has a simple form to allow you to store only the coefficients of a polynomial. You aready know that. But there is no simp...

4 years ago | 0

| accepted

Answered
I need help on finding the max & min values of a 3d array.
min and max are not sufficient? For example: A = randi(1000,[4 3 2]) [maxval,maxind] = max(A,[],'all') So 954 is the largest ...

4 years ago | 1

Answered
Is it possible to solve difference equation in MATLAB?
It looks like this is a homework question, so I am reluctant to post a complete answer. But at the same time, it looks like you ...

4 years ago | 0

| accepted

Answered
Stationarity of a signal.
This is not remotely a question about MATLAB, but of understanding what stationary means. You might want to do some reading. ht...

4 years ago | 0

Answered
Does Matlab have any intention to use C2000Ware instead of ControlSuite for Launchpad F28379D in future release?
Maybe. Maybe not. How is that for a definitive response? If you want a more accurate answer, you will need to get a job at The ...

4 years ago | 0

| accepted

Answered
Main Differences Between Symbolic Variables and Symbolic Functions
I'm really not sure what you are asking. One is a function of another variable, the other is a variable. A variable may be a con...

4 years ago | 1

Answered
why Solve function does not give correct solution?
When you solve a nonlinear system of equations, at times, some solutions are spurious. They fail, because some operation in the ...

4 years ago | 1

| accepted

Answered
I can't get the answer for A, B, C and D in matlab using solve command. These variables are functions of X1 and X2 which were previously solved.
syms X1 X2 equ1=(((X1-X2)*(20-X1-X2))/((1-X1)*(1-X1-X2)*(5)))==6600; equ2=((X2*(20-X1-X2))/((1-X1-X2)*(X1-X2)*5))==0.88; S= s...

4 years ago | 1

| accepted

Answered
Solving symbolic function in matlab
So VX is both a variable of integration, AND the upper limit for the integral? Seriously? Do you accept that this is the sort of...

4 years ago | 0

Answered
Is there an appropriate fitting methods for data that as orders of magnitude differences
You do NOT want to use a simple least squares on suh a problem. What will happen is the points that are very large will dominate...

4 years ago | 1

Answered
use of parentheses confusion
This is a question about operator precedence, and we can find the rules here: https://www.mathworks.com/help/matlab/matlab_prog...

4 years ago | 4

Answered
How to find out if a logical array is all zeros?
any does work, with a slight tweak. But you could also use all, or sum, or nnz, or even find. There are certainly many ways. if...

4 years ago | 1

| accepted

Answered
cube root of -1
Remember there are THREE cube roots of -1. -1 is not the only answer. In fact, it is not even the first solution to that problem...

4 years ago | 0

Answered
Curve Fitting and extrapolation for a semi-circle
There are many circle fitting tools to be found on the file exchange. You can use and download one of them, but I will concede t...

4 years ago | 0

Answered
Elementary matrices in Matlab
So many ways to do this. DGM showed a great way using toeplitz. But there are others. For example, you could use diag. n = 5; ...

4 years ago | 1

Answered
Is the solver 'lsqnonlin' boundary dependent?
This is unlikely to be the case of lsqnonlin being "boundary dependent". That is not true in my experience. It is more likely a ...

4 years ago | 0

Answered
What is the underlying mathematical method used by fittype() to fit data to a defined formula?
Well, fittype des not do the fitting itself. That would fall more into the regime of fit. fittype merely allows you to specify ...

4 years ago | 0

Answered
finding the start and end points of a unimodal peak
Wait a second! You are using findpeaks. It returns as one argument the peaks it finds, as well as the associated width. But you ...

4 years ago | 0

Load more