Answered
can I pass these nonlinear constraints to lsqnonlin?
Most of the f(x,y) that I am working on are indeed of the form f(x,y)=h(x)+g(y). If this is true, then ensuring the convexity o...

3 years ago | 0

Answered
How to check neighbouring elements in a 2D array
load Image BW=bwareaopen(~BW,100); se=ones(7); BW=medfilt2(BW,size(se)); BW=bwareaopen(BW,100); BW=~bwareaopen(~BW,10...

3 years ago | 0

| accepted

Answered
Find four input combinations with the same output value, and find the one that minimizes the cost function.
It would simply be, Bopt=min(B(A==Astar)); [x_sol,y_sol,z_sol,w_sol ] = ind2sub(size(A), find(B==Bopt));

3 years ago | 0

| accepted

Answered
How to guess initialization parameters for non-linear curve fitting to get the best fit?
Re-arrange the equation as follows y = a*b*c*x^2 + (a-y*b*a)*x = C*x^2 + D*x Assume C and D can be treated as constants a...

3 years ago | 0

Answered
Why does polyfit gives two outputs?
It doesn't give 2 outputs unless you call it with 2 output arguments. The one output that it is giving you is a vector with 2 co...

3 years ago | 0

| accepted

Answered
How can i pull a matrix out of matrix with indices?
Do it a completely different way. Example A=rand(5) B=rand(5) condition=A<0.5; B(condition)=0

3 years ago | 0

| accepted

Answered
bilinear extrapolation based on interp2
Although you've been advised against it, if you truly must extrapolate bilinearly then griddedInterpolant will do it for you, [...

3 years ago | 0

| accepted

Answered
Find the central line (midpoint) of a sinusoidal wave
yline(mean(y))

3 years ago | 1

| accepted

Answered
Least Squares with constraint on absolute value
You'll need to write the problem in terms of the real-valued components xi and xr of x, x=xr+1i*xi Once you do that, your abso...

3 years ago | 0

Answered
how can I delete zeros after virgule?
floor([0.254 0.435]*10)/10

3 years ago | 0

| accepted

Answered
can I pass these nonlinear constraints to lsqnonlin?
Can I implement those constraints as nonlinear constraints You can, but you have a few problems: (1) Nonlinear constraints c...

3 years ago | 0

| accepted

Answered
multivariate newton's method not working
You seem to be under the impression that it is far more extraordinary to thoroughly understand Newton's method, which I learned ...

3 years ago | 0

Question


Remove data tips from Live Editor plots
I somehow inserted a data tip in a surface plot that I created in the Live Editor. How can I remove it interactively?

3 years ago | 1 answer | 0

1

answer

Answered
Error at Matlab start up
I recommend a clean reinstall, and then also remove any path-modifying operations from your startup.m file, if you have one.

3 years ago | 0

Answered
Solve looping for big cell, vector, and summation
Z=repmat({rand(1,1008)}, 1,1000); whos Z %Fake input data Z=reshape(cat(3,Z{:}) ,[],4,numel(Z)); p=sum(Z,1); w=resh...

3 years ago | 0

Answered
Calculate the new position of a point after rotating
You can use this FEX download, which requires no toolboxes, https://www.mathworks.com/matlabcentral/fileexchange/30864-3d-rotat...

3 years ago | 0

Answered
Using App Designer to control inputs to an outside .m file - basic control
From your description, it sounds like the app code ought to be much simpler: classdef checkboxtester < matlab.apps.AppBase ...

3 years ago | 1

| accepted

Answered
Using polyfit in two arrays to detrend data.
p=polyfit(x,y,4); data_detrend = y-polyval(p,x)

3 years ago | 0

| accepted

Answered
Is there a way to constrain singular value decomposition results?
The closest analogue I can think of would be as follows. This could only make sense, though, if yo were trying to do some sort o...

3 years ago | 0

Answered
how change class name
The class name will be the same as the name you've given your .mlapp file.

3 years ago | 1

Answered
Make a new variable based on data in the cell array.
x=[1 2 3 0 0 6] x=x(logical(x))

3 years ago | 1

Answered
Make a new variable based on data in the cell array.
x=[1 2 3 0 0 6] x=x(x~=0)

3 years ago | 1

Answered
Make a new variable based on data in the cell array.
x=[1 2 3 0 0 6] x=nonzeros(x)'

3 years ago | 1

| accepted

Answered
Regression curve fitting for a given equation
p=polyfit(x,y,1); From this, you immediately obtain y0=p(2). For the remaining parameters, you can choose any of the infinite s...

3 years ago | 0

| accepted

Answered
Finding optimal parameters of a conjoined distribution of N variables over given data with fminsearch
To answer your question, you wouldn't define J using a loop at all. Your f(x) are vectorized over the measured data vector y, so...

3 years ago | 0

| accepted

Answered
How can assign numbers between two integer numbers instead of ones in a [0 1] matrix?
Sure. randi([lower,upper], 6,5)

3 years ago | 0

Answered
Plotting grouped 3D bars from 3D matrix
Perhaps as follows: z=rand(5,4,5);%Fake data numDelta=size(z,3); clear xtk for i=1:numDelta h=bar3(z(:,:,i...

3 years ago | 1

| accepted

Answered
How to find files containing two words with an extension.
Remove the extra asterisk: filename = dir('*pa750*mask*.mat')

3 years ago | 1

Answered
Is it possible to show two .fig files in the same figure?
I am able to display two .fig files in the same figure as in the code below (like hold on function). When you use hold on/off, ...

3 years ago | 0

Answered
rotate polar angle by an arbitrary angle
THETA0=THETA0-beta;

3 years ago | 0

| accepted

Load more