Answered
How to I find x in sin(x) = 0.65
Simple enough. I'll use solve, since you mentioned that. What happens if you just call solve? syms x solve(sin(x) == 0.5) So ...

4 years ago | 1

Answered
How do I create this full diagonal matrix
What are you doing with the matrix x, once you create a matrix with the diagonal in question? Does MATLAB know what you are doin...

4 years ago | 0

Answered
Polynomial surface fitting problem with constraint y <=1
You have the model: y = a*x1^b + c*x2^d I'll assume that x1 is temperature, and x2 is current discharged. You have told u...

4 years ago | 1

| accepted

Answered
Is it posible to solve system of differential equations with piecewise function inside?
Well, actually, yes you can solve the problem using a numerical ODE solver. That is trivial. For example, consider the simple pr...

4 years ago | 0

Answered
how to get common range for several intervals
Please stop asking the same question over and over again. Finding the sub-interval that covers the maximum number of intervals...

4 years ago | 1

Answered
A set of data has two large intervals, can it be divided into two sets of data? Thanks for your answer.
Are you asking how to divide this into two separate curves, the upper half, and the lower half? I can only assume that is your g...

4 years ago | 1

| accepted

Answered
Writing a script for Goldbach's Conjecture
Let me suggest you are starting from the wrong end? Instead, start with all primes less than your target maximum, so 1000. Can ...

4 years ago | 0

Answered
who does logical works
When something is too big or complicated, TAKE IT APART. TRY IT. x= [ 2 3 4 8 10 0 -2] So x is a vector of integers. What doe...

4 years ago | 1

Answered
CRT gamut solid
Not totally pertinent, but years ago, I built a solid model of some gamuts. I no longer have it, since I gave it away when I ret...

4 years ago | 1

Answered
Backslash for inverse to solve Ax=B
When you have a singular system, then pinv and backslash will both attempt to solve the problem, to the extent they can. I seri...

4 years ago | 1

| accepted

Answered
how do i write commands for errors and warnings in Matlab
You wrote code for an ERROR message. If you don't know if it is correct, then TRY IT! Does it do as requested? An error termina...

4 years ago | 1

Answered
How to get the expression of a 3d surface
Congratulations! You are the one millionth person to ask this same question. Your reward for this is a one way, unpaid trip to N...

4 years ago | 0

Answered
Failure in initial objective function evaluation. FMINCON cannot continue.
You need to read the examples. Look at the help for fmincon. Why? What is nvars? nvars = 2; nvars is the scalar 2. I assume y...

4 years ago | 0

| accepted

Answered
Alternating forward and reversed cos function
This may be easier than you think. But since you asked, and had no idea how to do it, it may be harder than you think. DRAT. Now...

4 years ago | 0

| accepted

Answered
How to calculate R^2 based on external linear equation?
Unfortunately, R^2 is not a completely simple concept when working with an orthogonal regression. To compute a valid R^2, we nee...

4 years ago | 4

Answered
How can i graph these equations?
None of the solutions you tried are correct, because they try to treat these functions as single valued relations. That is not t...

4 years ago | 0

Answered
Count number of digits after decimal point?
MATLAB does not distinguish between numbers with trailing zeros after the decimal point. That is, 0.25 == 0.250 == 0.250000000. ...

4 years ago | 1

| accepted

Answered
Factoring out a smaller equation, using symbolic math, from a larger equation
You were using collect in the wrong way. You were thinking in terms of what you wanted to see INSIDE the parens. Instead, you ne...

4 years ago | 0

| accepted

Answered
How can I set bounds for ga that change with the values of the optimization variables?
You cannot. Bounds are FIXED constants. They do not vary at all, and the optimizer assumes that as fact. If you have a constrai...

4 years ago | 1

| accepted

Answered
What do I do to upgrade from MatLab 2013a to run-on MacOS Catalina
What can you do now? Looking at the system requirements page, we see that R2019b is the oldest release supported for Mac OS 10....

4 years ago | 0

Answered
how to get convolution for two signals without using conv command
Several ways you could do this. If your signal is represented as a discrete sequence, then just use a double loop, accumulating ...

4 years ago | 0

Answered
Countering error while using interp1 function
Your problem is NOT in interp1. It is in the incorrect use of datetime. Read the error message: Error using datetime (line 597)...

4 years ago | 2

| accepted

Answered
Does Matlab have a way to find the formula that defines a sequence?
Things are never as easy as you think. For example, is there a simple difference relation that will generate this sequence: P =...

4 years ago | 2

Answered
Comparison of very large numbers
@Steven Lord said it exactly correct. The problem is not that a tool like ismember rounds anything, nor that ismembertol would h...

4 years ago | 0

Answered
How to convert BigInteger into binary?
You would not expect dec2bin to do it, when you convert the number oto a double. It will fail above 2^53-1, and that number is s...

4 years ago | 1

| accepted

Answered
Matrix in matlab equation
An alternative to repmat is to use a dot product (if you are an old APL person like me, then the phrase "outer product" will com...

4 years ago | 0

Answered
How to get more than 1 ans
The thing to remember with functions that return more than one argument is what MATLAB does with those arguments. Consider any f...

4 years ago | 0

Answered
Create a double identity matrix matlab
There are many basic ways, some not so basic. Perhaps my favorite is just: n = 8; A = triu(tril(ones(n)),-1) Here is another ...

4 years ago | 2

| accepted

Answered
How to find the coefficient matrix of a set of nonlinear equations?
This is a linear problem, IF you recognize that each of the right hand sides are linear in a,b,c,d except for the cube around th...

4 years ago | 1

Answered
Difference in exp(a*b) and (exp(a))^b when b is a fraction and a is a complex number
They look like they should be the same, yes. But sometimes your intuition about what is mathematically correct leads you astray ...

4 years ago | 3

| accepted

Load more