Beantwortet
How to code this equation to find y?
Is the result that MATLAB provided a valid result? syms y(x) ode = diff(y,x,2)+2*diff(y,x)+5*y == 1+x*exp(x) ySol(x) = dsolv...

mehr als 4 Jahre vor | 0

Beantwortet
Why is sec(theta) different than sqrt(1+tan(theta).^2) in MATLAB?
First, what you have written is NOT an identity. The identity is sec(theta)^2 = 1 + tan(theta)^2 There IS a difference! Y...

mehr als 4 Jahre vor | 1

Beantwortet
Why does MATLAB give an error with this instruction? x(0.14*100)=5;
Is there a bug in MATLAB? Sigh. If I had a nickel for every time someone has asked that question, I would be wealthy. (It does n...

mehr als 4 Jahre vor | 2

| akzeptiert

Beantwortet
Linprog gives a solution but one constraint is not satisfied (no notification)
Not possible to know, since you don't actually show us the code you wrote. You may have done something wrong. Or it may just be...

mehr als 4 Jahre vor | 1

Beantwortet
make a data plot
Easier than you think. First, write a little function that will plot a bar of fixed height, between two points on the x axis. I...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Multiplication of large matrix with its transpose
Best is to never create it at all. Instead, use mathematics to work with it. And that depends on what you will do with this matr...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Forcing positive values when solving system of linear equations
Sorry. PINV does not allow you to constrain the sign of your estimates. You can use LSQNONNEG, which does allow you to do that,...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
How can I convert the shape of one class to another using Matlab?
All you have is a picture, not a shape. Until you express those boundaries as a shape of some sort, you cannot do anything. Sin...

mehr als 4 Jahre vor | 0

Beantwortet
Solving ODE with non-constant parameters using ode45
Trivial. In fact, there are many ways I could do this. As an example, i'll define it in terms of three other parameters, S,u an...

mehr als 4 Jahre vor | 0

Beantwortet
Matlab function deprecates its inputs
Your function is copied below. Answers actually uses R2021b, so we can test your assertion here. param_init('ExternalSubject') ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
why does 'sum' and 'trapz' function show same result ?
Um, no. Sum is not the same as trapz. Are they close, under some circumstances? Well, yes. format long g sum(B) ans = 591258...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
How to obtain union of three shapes given the coordinates
Tivial. generate the three objects as polyshapes. Compute the union. For example... cy_l=0.3; % length of rectangle outside...

mehr als 4 Jahre vor | 0

Beantwortet
How to get the source code of a function
If the function is compiled, then no. Sorry, but no. MathWorks does not give out code, unless you work for them. So sure, just g...

mehr als 4 Jahre vor | 1

Beantwortet
Contour plot of x and y
Since you have not (yet) shown me any data or answered my questions, I'll offer one simple solution, just making guesses about t...

mehr als 4 Jahre vor | 0

Beantwortet
Contour plot of x and y
I'm not sure what you mean. A contour plot is a specific type of plot. A contour is a level surface, that is, the set of points...

mehr als 4 Jahre vor | 0

Beantwortet
How to resolve problem in for loop?
Is "a" a number, in the form MATLAB will expect it? NO! a is a BigInteger number. You cannot use the colon operator on a. a=jav...

mehr als 4 Jahre vor | 1

Beantwortet
Find unique values in a pseudo inverse based on SVD
Um, in general, ALL of the values in the computation will be non-unique. In some simple, RARE cases, that will not be true. How ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Multiplication on the diagonal of a submatrix
You really want to learn better ways to time things than to use tic and toc. They are not very accurate for short times. Not too...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Iteratively defining and solving equations
It is a LINEAR system of equations. You don't want to be solving them iteratively. You need to learn how to define the matrix th...

mehr als 4 Jahre vor | 0

Beantwortet
How to generate two random where the distance between is within a range
Can you "say" that? Um, yes. But then you need to write the code. Given one known point, now you want to find another randomly ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
how do i integrate one vector by using "intergral function" and not trapz ?
You cannot use the intergral function, as it does not exist. You could use integral, almost. :) Except that it does not apply to...

mehr als 4 Jahre vor | 0

Beantwortet
how to get the argument and the modulus of a analytic complex function?
The use of mod as the name of a variable is a REALLY bad idea. Soon, when you begin using MATLAB more, you will trip over things...

mehr als 4 Jahre vor | 0

Beantwortet
unrecognized functions or variable
You don't import a function into MATLAB. Perhaps you are thinking Python, or some similar environment. It looks like onehotenco...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Fit power function to data (optimization)
Your problem is, you are trying to use LEAST squares. But look carefully at your data. xdata = [0.02 0.05 0.1 0.2 0.3 0.4 0.5];...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
need help with this my fsolve is not working
You were close. And I think what you did wrong was not completely obvious. Your function is below. First, BEFORE YOU EVER TRY t...

mehr als 4 Jahre vor | 2

| akzeptiert

Beantwortet
How to rearrange an equation in matlab to get the poles?
Vs = 1; Z0 = 50; R = 50; C = 1e-9; L = 0; syms s %Where s = j*w %Impedance of the resistor ZR = R; %Impedance of the ca...

mehr als 4 Jahre vor | 0

Beantwortet
How to find baseline intensity in noisy mass spectra?
First, define baseline. Is it the lowest value the signal does not drop below? If so, then the baseline is trivial to estimate. ...

mehr als 4 Jahre vor | 0

Beantwortet
Integration of a function
Integral is a NUMERICAL tool for integration, uing adaptive numerical methods. It will return a NUMERICAL result, and only appli...

mehr als 4 Jahre vor | 0

Beantwortet
Best choice of fmincon algorithm for high-cost 1D convex problem with "stochastic" gradient information?
A 1-d problem, so ONE unknown? Don't use fmincon at all! And if you wish to supply the gradient, then you cannot supply only a...

mehr als 4 Jahre vor | 0

Beantwortet
Feature Request: Set Logarithmic axes in the 'Distribution Fitter' tool
Answers is NOT the place to submit feature requests. We are not customer support. We are not any kind of official support. If y...

mehr als 4 Jahre vor | 0

Mehr laden