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

plus de 4 ans il y a | 1

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

plus de 4 ans il y a | 0

| A accepté

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

plus de 4 ans il y a | 0

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

plus de 4 ans il y a | 0

| A accepté

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

plus de 4 ans il y a | 1

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

plus de 4 ans il y a | 1

| A accepté

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

plus de 4 ans il y a | 1

| A accepté

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

plus de 4 ans il y a | 0

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

plus de 4 ans il y a | 1

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

plus de 4 ans il y a | 4

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

plus de 4 ans il y a | 1

| A accepté

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

plus de 4 ans il y a | 0

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

plus de 4 ans il y a | 0

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

plus de 4 ans il y a | 1

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

plus de 4 ans il y a | 0

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

plus de 4 ans il y a | 0

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

plus de 4 ans il y a | 0

Réponse apportée
Can I take data while setting them
I'll write this as an answer, intead of a comment on @Yongjian Feng's excellent response, as otherwise my thought can become los...

plus de 4 ans il y a | 3

Réponse apportée
How to convert all array values into negative ones?
So many ways. Don't forget the simple solution: A = [2; 3; 5; -8; 9; 1; -1] B = -abs(A) % this makes all of the signs positive...

plus de 4 ans il y a | 0

Réponse apportée
How to find constants of integral knowing initial conditions
Raz=26.67*10^3; qo=20; L=3000; M=10*10^6; E=2.1*10^5; d=100; Izz=(pi*d^4)/64; syms x C1 C2 My_x=-Raz*x+(qo*x^2/2)-M; ph...

plus de 4 ans il y a | 1

Réponse apportée
how do i get the solution from ODE45?
You cannot do so. PERIOD. ODE45 is NOT an analytical solving tool. Would you expect code written for one purpose to perform what...

plus de 4 ans il y a | 0

Réponse apportée
I am trying to plot the following function but there is a syntax error which I am not sure about
How do you often write the square of cos(x)? Yes, a common mathematical notation is to use cos^2. In MATLAB? Sorry but not valid...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Coding in m-file, for a func defined in an interval [x0, xn] like Fi(x)(=(c1(i)+c2(i)*sin(w1*(x-x(i)))+c3(i)*cos(w2*(x-x(i)))+c4(i)*sin(w2*(x-x(i)))+c5(i)*cos(w1*(x-x(i))))?
There are still some issues with the question. Note that it is a REALLY bad idea to use the vector x(i) to indicate break points...

plus de 4 ans il y a | 0

Réponse apportée
how to code binary integer programming model?
So you have 18 unknowns. What is the problem? What have you tried? You will call intlinprog, (older releases will call bintprog,...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Generate a numerical series
While @DGM is correct (+1 from me on that answer, please accept that answer, as it is the correct one), in that it is what I wou...

plus de 4 ans il y a | 1

Réponse apportée
Solve a System of five non linear equation
E_i=[( w1*gamma(mu1+1/a1)/( ( mu1^(1/a1) )*gamma(mu1) ) )+( (1-w1)*gamma(mu2+1/a2)/( ( mu2^(1/a2) )*gamma(mu2) ) )==C1,... ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Which is Better for Polynomial Equations: roots or solve?
Roots versus solve can be VERY different in the result. The answer is you need to understand the differences. When is increased ...

plus de 4 ans il y a | 2

| A accepté

Réponse apportée
Create a vector from repetition of two others
A=[1 2 3 4 5]; B=[6 7 8 9 10]; reshape([A;B],1,[])

plus de 4 ans il y a | 1

Réponse apportée
issue with 'intersect' function
I'm sorry, but your problem lies in understanding floating point arithmetic. Two sets of floating point numbers, created by even...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
common tangent of double-well function
This is actually not a difficult problem to solve, IF you think about what a tangent line means. For example, consider the pol...

plus de 4 ans il y a | 3

Charger plus