Answered
Matrix from different expresions
E_xi=str2sym(input('Enter the function for E: \n','s'))

6 years ago | 0

| accepted

Answered
How to find common tangents between 2 ellipses ?
alpha1=30; alpha2=-45; %EDIT a1=0.015; b1=0.020; xC1=0.13; yC1=0.09; a2=0.08; b2=0.10; xC2=0.27; yC2=0.11; T1=eye(3); T...

6 years ago | 5

| accepted

Answered
Accessing subclass methods from abstract superclass
Probably not exactly what you were hoping for, but this solution does make sense when doC@ParentClass contains a lot of code. No...

6 years ago | 0

Answered
convert polynomial to vector in symbolic matlab
See sym2poly.

6 years ago | 0

Answered
Mixed Integer Linear Programming Problem
Since your unknown x(i) are bounded between 0 and 1, an upper bound on abs(A*x) is sum(abs(A),2). It seems doubtful to me that s...

6 years ago | 1

Answered
Separate two type of object in the image
Perhpas as follows, A=~logical(imbinarize(rgb2gray(imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/46991...

6 years ago | 0

Answered
how to solve AX = 0 with some entries of X known
Rearrange the equations in the form A(:,unknown)*X(unknown)=-A(:,~unknown)*X(~unknown) This is a standard linear equation and ...

6 years ago | 0

Answered
2 unknown variable constraint optimization with single unknown variable objective function
The problem, as you've posted it, has an analytical solution, which can be obtained using https://www.mathworks.com/matlabcentr...

6 years ago | 0

Answered
Filling in multidimensional array efficiently
If you want b to be inserted in the topmost rows of each array(:,:,f, ch), then it would be, array(1:size(b,1),:,f, ch) = b

6 years ago | 0

| accepted

Answered
Fourier transform using Convolution
You must use int to implement a symbolic convolution integral. conv is for numeric convolution.

6 years ago | 0

Answered
2 unknown variable constraint optimization with single unknown variable objective function
fun=@(z) C1.*z(1).^2 +C2.*z(1)+C3;

6 years ago | 0

| accepted

Answered
Inverse of a function gives different results than the negative function with fmincon
With f(x)=-x1, the norm of the gradient of f is always 1. However, with f(x)=1/x1, the norm of the gradient will fall off quadra...

6 years ago | 0

Answered
How to measure the moon crescent
Right now i want to measure the area of the crescent and then viscircles on it. Using this FEX package, https://www.mathworks...

6 years ago | 1

| accepted

Answered
Evaluation-Interpolation using FFT algorithm
A highly impractical thing to do. If you know the coefficients of the polynomial, you should just use polyval(). However, if yo...

6 years ago | 0

Answered
Inequality constraints for optimizer
Assuming the region is convex, the answer is yes in both cases. Otherwise, the answer is no - inequalitites will not be enough t...

6 years ago | 1

| accepted

Answered
How to make spline basis matrix?
Example1D.m in this File Exchange submission shows how to set up a B-spline basis matrix, https://www.mathworks.com/matlabcentr...

6 years ago | 0

Answered
Optimization of vectors with optimization toolbox
i would like to add 2 more constrains, about domega/dt and for dT/dt. any one have idea how to do that? You can use diff() to ...

6 years ago | 0

Answered
How to measure the moon crescent
It looks like you could just use bwareafilt to find the largest black object. https://www.mathworks.com/help/images/ref/bwareaf...

6 years ago | 0

Answered
How to call a function by assigning a string to a variable?
Since you've set Optimize=false, I don't know why you are sending the result to a file. You may as well just use the output of m...

6 years ago | 0

Answered
How to call a function by assigning a string to a variable?
feval(output,arg1,arg2,...) or fun=str2func(output); fun(arg1,arg2,...)

6 years ago | 0

| accepted

Answered
BinImg(i,j)== BinImg(i,j+1)
count=sum( diff(BinImg,1,2)==0 ,2); BinImg(count<30,:)=0; LicenceImg=BinImg;

6 years ago | 0

Answered
Array of Objects as a Property of Class
classdef ECG < handle properties (SetAccess = private) Segment {ismatrix} end methods function segmentECG(obj,...

6 years ago | 0

| accepted

Answered
fmincon, nonlcon, ode45 - objective output in nonlinear constraint
You need to get familiar with Passing Extra Parameters - MATLAB & Simulink. Also, fmincon is not appropriate for the max-norm ob...

6 years ago | 0

| accepted

Answered
How to find a vector containing mean values of the corresponding cells?
It's not clear from your description what data type A is, in particular whether it is numeric or a cell array,. It shouldn't be ...

6 years ago | 0

Answered
Setting properly the step tolerence of fmincon
There is no way to make fmincon restrict its search to a discrete set of values.

6 years ago | 0

Answered
How to make Matlab non-positive and positive function
See filter() D(1)=D(1)+100*delta/rho; S=[100,filter(rho,[1,-delta], D)]

6 years ago | 0

Answered
I'm getting not enough input arguments error, why?(don't have any equality/inequality constraints) can suggest me any other alternatives to perform optimization!!!
function f= fitnessfunc(x) [l,vgs,t1,t2,vds]=deal(x(1),x(2),x(3),x(4),x(5)); f= (0.1477*10^-8*1./l*(2*(vgs-0.57)-0.2*(t1....

6 years ago | 0

| accepted

Answered
Vectorizing nonlinear matrix operation on many small matrices
m = 3; % small number in general n = 2^20; % large power of 2 in general A = rand(m,n); tic; B = zeros(m^2,m^2); ...

6 years ago | 2

| accepted

Answered
Curve Fitting for a function with 3 fitting parameters.
Also useful, https://www.mathworks.com/matlabcentral/fileexchange/10093-fminspleas With this tool, you would effectively elimi...

6 years ago | 0

Answered
Problem related to optimization
These links may help, https://www.mathworks.com/help/optim/ug/optim.problemdef.optimizationproblem.optimoptions.html https://w...

6 years ago | 0

Load more