Réponse apportée
How to solve trigonometric equation x*cos(x)+sin(x)=0 with function fsolve?
This is just a variation of a problem I've seen given many times. It is one of the simplest equations I can think of that has no...

plus de 4 ans il y a | 0

Réponse apportée
Why are there variations in values when using floor function?
Do you understand that it is impossible to represent most fractinos as floating point numbers, and do so exactly? That is, is th...

plus de 4 ans il y a | 0

Réponse apportée
Spline Interpolation for Motion Profile
You can't get an "equation" for a spline. Well, you can, IF you understand splines in some depth, but it is a bit of a piecewise...

plus de 4 ans il y a | 0

Réponse apportée
How to make matlab give me a numeric answer to a matrix with infinite solutions
MCh =[ 1 0 -1 0 5 0 0 -1 0 2 -3 -1 0 1 -4 0]; rank(MCh) You wish to solve the 4x4 homoge...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
null() fails for a symbolic numeric 5x5 matrix
It is often difficult to know what a compiled code has done under the hood, especially when symbolic operations are involved. Ho...

plus de 4 ans il y a | 0

Réponse apportée
generating random numbers from poisson distribution
Since the request has now morphed to do so without using poissrnd, that makes it very likely homework. In that case, you might ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
the meaning of a sentence in command window
I think you are perhaps confused. And the answers are a bit confusing too. And, of course, we don't know any characteristics of ...

plus de 4 ans il y a | 1

Réponse apportée
Find rows with common values using intersect
Intersect is the wrong way to approach this, I think. And at the same time, the solution is probably going to seem easy, once yo...

plus de 4 ans il y a | 0

Réponse apportée
Optimization of weighted sum
First, LEARN TO USE ARRAYS!!!!!!!! Don't create 8 different numbered variables. Why does that make sense, when you can create O...

plus de 4 ans il y a | 2

Réponse apportée
Associating another Person's Academic MatLab License with my name.
You can contact Mathworks, and ask them. To be honest, the answer is your scheme is probably not legal, since it is essentially ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
I need to find the length of the longest strictly increasing subsequence array from a given array I just need a tip to start. Any type of help will be appreciated
Can you use diff on your vector? What property does the result of diff have on strictly increasing sequences? Will all elements ...

plus de 4 ans il y a | 0

Réponse apportée
error in integration of function
You don't understand. You define x. i and N are numbers. i = 1; N = 100; h = 1/N; x = (i-1)*h; What is x now? A number. Gr...

plus de 4 ans il y a | 1

Réponse apportée
Cannot simplify a result
You got a "numerical" result. But because the result is symbolic, that is the symbolic result. pi, and square roots are as you w...

plus de 4 ans il y a | 0

Réponse apportée
before running the code then Px would be considered to be a variable instead of a function. You might have assigned something to Px in an earlier version of the code and not c
for i = 0:len-1 dif = a(i+1,1) - a(i,1) i starts out at 0 in the for loop. Does MATLAB alow a 0 index for an array? (NO.)...

plus de 4 ans il y a | 1

Réponse apportée
How to speed up the code to check if randomly generated number in a certain range is a prime ?
The simple answer is to generate the primes in that range, ALL of them, and then look to see which of your randomly generated el...

plus de 4 ans il y a | 0

Réponse apportée
swapping two matrices with similar randomness
You just need to learn how to use indexing. A = [1 2 3 4 5]; B = zeros(5,2); B(:,2) = A/10 Note that even thoiug...

plus de 4 ans il y a | 0

Réponse apportée
how to set a loop to calculate time
EVERY pass through your loop, you REDEFINE the variable t. Learn to use MATLAB. Stop thinking in terms of loops for everything. ...

plus de 4 ans il y a | 0

Réponse apportée
I need to find a way to plug in unknown values into a function I curve-fitted to known data.
This is not as hard as you make it seem. (Honestly, I tend not to use cftool at all. I just use fit.) Look at the menu options....

plus de 4 ans il y a | 0

Réponse apportée
Irregular intervals inside a for loop
There are multiple ways to do this. For example: P = primes(20); % Note that P is a ROW vector P SumP = 0; for P_i = P Su...

plus de 4 ans il y a | 0

Discussion


Counting the passengers on a train: solving a basic problem using MATLAB
I saw this problem online recently. <https://www.youtube.com/watch?v=-rbozrj9poo Passenger distribution on a train> Not a...

plus de 4 ans il y a | 8

Réponse apportée
Which triangulation method does alphaTriangulation?
An alpha shape starts with a Delaunay triangulation. Then some parts of it are deleted as defined by the alpha shape. (Having wr...

plus de 4 ans il y a | 1

Réponse apportée
Locate index and weights for linear interpolation for a monotonically increasing vector
I cannot compare your code to something meaningful because your code is not complete. It lacks mustBeLogical, and possibly other...

plus de 4 ans il y a | 1

Réponse apportée
Solving 3 equations with 3 unknowns using for loop ?
syms Xb Xm a E1 = (Xb-Xm*25e-3)*(-230.6815e-6*a) == (1.05e3-1.01038e3)*9.81*1.2566e-6 ; E2 = (Xb-Xm*50e-3)*(-108.65e-6*a) == (...

plus de 4 ans il y a | 1

Réponse apportée
Can the equations in the differential equation group be represented by symbols when matlab ode solves the differential equation group ?
Sorry, but the numerical ode solvers, such as ODE45 are NOT symbolic tools. They CANNOT solve an ode with symbolic parameters. P...

plus de 4 ans il y a | 0

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

plus de 4 ans il y a | 1

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

plus de 4 ans il y a | 0

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

plus de 4 ans il y a | 1

| A accepté

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

plus de 4 ans il y a | 0

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

plus de 4 ans il y a | 1

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

plus de 4 ans il y a | 1

| A accepté

Charger plus