Answered
How can i generate an array of integers that is more dense around a certain value?
Honestly, you could probably do something using an optimization. But using an optimization technique to solve this seems to be t...

3 years ago | 0

Answered
Adding a binary decision variable in a linear optimization problem
linprog CANNOT be used with integer (binary) variables. However, there is intlinprog, which is explicitly designed to handle e...

3 years ago | 0

| accepted

Answered
I have calculated 4 standard deviation values for each row of a 4x3 matrix. How to convert these 4 values into a single standard deviation value for the whole matrix?
You should understand why it is not possible to compute the overall standard deviation, merely from the pieces. This is because ...

3 years ago | 0

Answered
How to calculate the date 0.25 years after the date of January 15, 2020
You did this: t = datetime(2020,1,1) But that is not January 15. It is January 1. Instead, had you done this: t = datetime(20...

3 years ago | 0

Answered
linear vs nonlinear regression model
@Mohammadreza As I said in my comment, there are two different kinds of linearity. Consider the model: y = a*exp(x) Is y line...

3 years ago | 2

| accepted

Answered
How to convert a string like "2.0:0.25:10.0" into a vector of floats?
A few ways I can think of immediately. S = "2.0:0.25:10.0" V = eval(S) V = str2num(S)

3 years ago | 1

| accepted

Answered
How do you go about guessing for fitting parameter initializations?
There is no magic way to guess parameter estimates for any nonlinear problem. Sorry, but true. And of course, if there was, then...

3 years ago | 0

Answered
I try to find a general vector base for all magic squares of dimension n . Why does this program work for n = 3, but not vor n > 3?
No resonse yet? Again, I don't see why you are using rref here. If all you want are basis vectors, then tools like null and orth...

3 years ago | 1

| accepted

Answered
will there be support for version 2 of the twitter api?
In general, we cannot tell you IF there will be support for anything. The MathWorks does not release information about their pla...

3 years ago | 2

Answered
how can I take elements of an array as input to a function in a set of 10 elements each?
A terribly confusing question. (Even if I ignore the fact that your subject says 10 elements, but the question text says 26 elem...

3 years ago | 0

Answered
How can I create a spline with conditions on the middle?
Just use my SLM rtoolbox. It can impose literally any condition on a spline that you want. And it can impose conditions on the s...

3 years ago | 1

Answered
Finding four input combinations with the same output value by interpolation method, and find the one that minimizes the cost function.
Um, your technique will not really solve the problem. It approximates the solution. Regardless, you will now have difficulties e...

3 years ago | 0

Answered
Sum a matrix element using a window size of 4
Reshape the array, to be now of size 4x4x2 A = [-2 -2 -2 2 -2 2 -2 -2 -2 2 -2 -2 -2 -2 -2 2 -2 -2 2 -2 -2 2 2 2 ...

3 years ago | 0

Answered
how to compute intersection of union for two polygons?
T1 = importdata('T1.mat'); T2 = importdata('T2.mat'); polygon1= [T1(:,1),T1(:,2)]; plot(T1(:,1),T1(:,2),'b.') hold on plot(...

3 years ago | 1

| accepted

Answered
fmindnd problem doesnt run
Never just say something does not run, and nothing more. Would you tell your doctor that something seems wrong, and hope they ca...

3 years ago | 0

Answered
Suppose i have a matrix (2x4) A=[1 2 3 4;5 6 7 8] and i want to change it into this matrix [1 2;3 4;5 6;7 8]. How to do that?
help transpose help reshape Essentially, you need to learn how elements are stored in a matrix. You need to learn to manipulat...

3 years ago | 0

Answered
how to fit a curve in matlab?
You really have very little signal, compared to what is apprently noise in those "curves". As such, you would be ill-advised to ...

3 years ago | 0

Answered
How to change specific numbers to 0
For some reason? Learn to use ismember instead. What you think makes sense does not work in MATLAB. And that means you need to s...

3 years ago | 0

Answered
Help with solve and symbolic equations
The first equation does not use i0 at all. So it makes no sense to try to solve two equations for one unknown anyway, where that...

3 years ago | 1

| accepted

Answered
bilinear extrapolation based on interp2
Ugh. This is just a bad idea, Extrapolation in general is a bad thing to do. A better word is probably excrapolation. You will g...

3 years ago | 1

Answered
How to take the middle of a list?
"really specific" issues probably means that it makes no sense to ask for the middle 3 elements of a VECTOR (Python has lists, M...

3 years ago | 1

Answered
Inverse input/output of switch case function
In general, no, that is not possible, at least to get MATLAB to do this automatically for you (if your mapping is not a single-v...

3 years ago | 2

| accepted

Answered
What resample method can I use for time series that increases nonlinearly?
This is really an interpolation problem. You can call it a resampling, but interpolation is all it is. And you can do everything...

3 years ago | 1

| accepted

Answered
Is there a way to constrain singular value decomposition results?
No. You cannot constrain the SVD (as employed by PINV, I assume) to yield a solution that obeys bound constraints. That computa...

3 years ago | 0

Answered
Need gradual data values.
Actually, it IS quite a smooth curve. Almost perfectly smooth, in fact. y = [0.0320415867172945 0.184398415806668 0.0...

3 years ago | 0

Answered
How to surf very small values keeping the same ratio?
I THINK what you are asking is how to make the surface show there is little variation in z. I'll make up an example... [X,Y] = ...

3 years ago | 0

| accepted

Answered
Subdividing a 2-D Polygonal Shape Using Values Given in an Array
Sadly, this is an impossible task to do perfectly. Even imperfectly is difficult. And wanting quadrilaterals makes it harder yet...

3 years ago | 0

| accepted

Answered
Will the MATLAB Answers community diminish/obsolete with the rise of AI-based chatbots?
Will it? Well, CAN it? Yes, of course. I have no claim to omniscience, nor any reservations that something or someone would/coul...

3 years ago | 2

| accepted

Answered
How do you get first n number of solutions while solving numerically ?
Too late, since you have an answer that solves your problem to your satisfaction. I want to point out something you probably nee...

3 years ago | 1

Answered
How to solve the problem of convergence at the infeasible point?
You have 22 unknowns, and 18 constraints, 12 or them linear, but the other 6 are nonlinear equalities. A 22 dimensional space is...

3 years ago | 0

Load more