Réponse apportée
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 ...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 1

Réponse apportée
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...

plus de 4 ans il y a | 1

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 4

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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. ...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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....

plus de 4 ans il y a | 0

Réponse apportée
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 ...

plus de 4 ans il y a | 0

Réponse apportée
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)...

plus de 4 ans il y a | 2

| A accepté

Réponse apportée
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 =...

plus de 4 ans il y a | 2

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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 ...

plus de 4 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

Réponse apportée
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 ...

plus de 4 ans il y a | 3

| A accepté

Réponse apportée
Projection of 3D points on plane
Why do you think the original distances between the points should be the same after a projection? NOT SO!!!!!!! In fact, it is t...

plus de 4 ans il y a | 0

Réponse apportée
Optimization of function of 3 variables
You need first to define this as a function handle. Then you need to use FMINCON as the solver, or GA will also work. The const...

plus de 4 ans il y a | 1

Réponse apportée
Calculating the mathematical expression
There are two possible questions in this. You have a vector y, and a vector z. You wish to evaluate the expression for x, for A...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
I can't calculate the integral function in this exampleCan anyone give me some advice? thank you
You can't use a tool like int to integrate a vector of numbers. In fact, all you were doing is integrating a constant. Instead,...

plus de 4 ans il y a | 0

Réponse apportée
Need help to solve nonlinear ode in matlab
Just for kicks, I had to try solving this using dsolve to see what it would do. syms u(x) T = 1; R = 0.5; % Just picking a va...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Termination tolerance with fzero function
As Torsten suggests, you cannot use fzero with no initial guess. In fact, fzero runs better with a bracket, than just a single g...

plus de 4 ans il y a | 2

Charger plus