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...

2 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 ...

2 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(...

2 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...

2 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...

2 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 ...

2 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...

2 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...

2 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...

2 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

Answered
gernerating standard normal variable in matlab
I'm a little confused. Why would you expect the result (of z*z') would be even remotely close to an identity matrix? In fact, yo...

3 years ago | 0

Answered
Set Element Index to 1
Your real problem is you misunderstand what you are doing, in wanting to write a Newton-Raphson code! If I had to guess, your co...

3 years ago | 0

Answered
Random numbers generation based on specific distribution function, then sort in specific way
Where is the problem? You don't say what the distribution of those numbers is, so absolutely nothing can be done until you deci...

3 years ago | 0

Answered
constrain the csapi fitting to positive values
I'm sorry, biut you cannot constrain an interpolating spline built by csapi to be everywhere positive. The mathematics of how th...

3 years ago | 0

| accepted

Answered
Formulating a part of a given circle
Drawing circular arcs here seems a bit unnecessary, since there is no need for it. You seem to be just looking for the basic sha...

3 years ago | 1

Answered
What is the difference in inpaintn and inpaint_nans functions?
inpaint_nans is my code, so I know where it is, on the file exchange. Looking there, I see also a code named inpaintn. If you w...

3 years ago | 1

| accepted

Answered
My Matlab command windows displays poorly organized rows and columns whenever I display a big array, how to I fix this?
You need to set the desktop text font to be a monospaced font. Go to: Settings/Fonts I tend to use something simple like M...

3 years ago | 1

Answered
Does the randi function have a good level of pseudorandomness?
randi is random. At least as good as is mathematically possible to make it so, based on the random number generation tools we ha...

3 years ago | 1

Answered
Integral of user-defined function
Is your code vectorized? That is, what happens when a VECTOR of elements for y is passed in? (It does not appear to be.) integ...

3 years ago | 0

Answered
I want to find second and third maxima in a row of a matrix of size 1000*8
BREAK DOWN PROBLEMS THAT ARE TOO LARGE FOR YOU TO HANDLE INTO SMALLER, BITE SIZED CHUNKS. First, if it is a particular row, the...

3 years ago | 0

Answered
How to get area between 2 cdf curves?
If the curves cross, then you need to decide what the "area between" means. That is, is the area in one part negative? Or do you...

3 years ago | 0

| accepted

Load more