Answered
Optimizing a parametrized geometry with genetic algorithm
Whn generating y2, your current code attempt doesn't make it clear what values you intend for "A". Perhaps this is what you mean...

4 years ago | 0

Answered
Transform ellipse obtained from oblique slice of a cylinder to a circle
Use fitgeotrans with an 'affine' transformation type to determine the necessary transformation. The output wll then be in a form...

4 years ago | 0

Answered
How to transpose many matrices X_1 ... X_N at once?
The matrices must be put into some kind of container if you want to operate on them as a group. If you can't cat() them, then th...

4 years ago | 2

Answered
How to transpose many matrices X_1 ... X_N at once?
In R2020b or higher, you can use pagetranspose or pagectranspose X=randi(9,3,3,2) Y=pagetranspose(X)

4 years ago | 1

Answered
How can I create a vector
a=[2,4,3]; b=1./repelem(a,a)

4 years ago | 0

Answered
How can I find all possible solutions to a LP?
If the convex hull is a bounded polyhedron, you can use lcon2vert from, https://www.mathworks.com/matlabcentral/fileexchange/30...

4 years ago | 0

| accepted

Answered
How can I fix SOLVE ignores UseParallel when derivatives calculated automatic differentiation warning for parallel computing?
It's not something to fix. It's what you want. Analytical differentiation is the fastest option, when it is available.

4 years ago | 0

Answered
How to get the coordinates of the point where the derivative is zero in curve fitter?
Assuming you have the cfit object f generated by the fit, fzero(@(x)differentiate(f,x), [a,b]) %search interval [a,b]

4 years ago | 1

| accepted

Answered
Display optimization variable/solution
pages=any(sol.x==1,[1,2]); disp(sol.x(:,:,pages) )

4 years ago | 0

| accepted

Answered
save each 2 dimensions of 3 dimensions matrix
As Rik says, it's a terribly inadvisable thing to do, however, here is one way you could accomplish it: s=cell2struct( num2cell...

4 years ago | 0

Answered
How can i extract coordinates of point from matlab figure ?
You already have the point data from your code: Xu,Yu.

4 years ago | 0

Answered
gaussian fit to 2D pcolor map
You could try gaussfitn, https://www.mathworks.com/matlabcentral/fileexchange/69116-gaussfitn idx=~isnan(C); xy=[xx(idx),yy(...

4 years ago | 0

Answered
Matrix multiplication optimization using GPU parallel computation
Because in your second formulation, there is no need to build a table of non-zero entries for the sparse matrix B. The table-bui...

4 years ago | 0

| accepted

Answered
Creating vector using rand() function in a range
A=7*rand(1,10)

4 years ago | 2

| accepted

Answered
decomposition used in parfor
Your example doesn't describe a situation where either decomposition() or parfor will be beneficial. You should instead just use...

4 years ago | 1

Answered
While loop has disagreeing matrix dimensions
while strcmpi(inputMaterial,'steel')

4 years ago | 0

| accepted

Answered
HOW CAN I DEAL WITH NEGATIVE VALUS I AM RECEIVING AFTER PERFORMING DECOMPOSITION
Threshold them? x=[-2 -1 0 1 2 3] xpos=max(x,0)

4 years ago | 0

Answered
Attempt to execute SCRIPT varargin as a function:
Your function does not begin with the function declaration line.

4 years ago | 0

| accepted

Answered
Extract fields from structure
S.C.XX_YY1=5; S.C.XX_YY2=10; S.C.ZZ=3; f=fieldnames(S.C); I=startsWith(f,'XX_YY'); f=string(f(I)); for fI=string(f...

4 years ago | 0

Answered
Create the program to return the orthogonal basis and orthonormal basis
You should just use orth to get the orthonormal basis. And you should use qr instead of Gram-Schmidt.

4 years ago | 1

Answered
Running multiple scripts on separate cores in parallel
fcn=@(i) run("test"+i); for K=1:n F(K)=parfeval(fcn,0,K); end; wait(F)

4 years ago | 0

| accepted

Answered
A compact way to remove empty rows in a cell array matrix ?
a = { '22-Jul-2021 17:00:00', 49 '', [] '', [] '', [] '', [] '27-Jul-2021 20:00:00', 123 '...

4 years ago | 0

| accepted

Answered
How define limits of upper and lower bound in Fmincon having different variables
SInce X0 is 4x3, your LB and UB will be 4x3 as well.

4 years ago | 0

| accepted

Answered
Specify initial condition for linprog?
You can try adding the inequality constraint f.'*x<=f.'*x0.

4 years ago | 0

Answered
Vectorize an anonymous function
This FEX submission already appears to do what you want, https://www.mathworks.com/matlabcentral/fileexchange/69116-gaussfitn?s...

4 years ago | 0

Answered
Vectorize an anonymous function
Just replace all the uniqPosOne(n,:) with uniqPosOne: gaussElpt = @(param) (param(1) + param(2).*(exp(-1/2 .* (uniqPosOne - [p...

4 years ago | 0

| accepted

Answered
Fast fourier transform on every single pixel of time series images
fftn(ImageSeries,[],3)

4 years ago | 0

Answered
Error in using 'cumtrapz' for integration
But next, value of h1 at each grid point must match {-sin(grid point value) - (-sin(-1))}, No, it will be -sin(x)+x*cos(-1) -(...

4 years ago | 0

| accepted

Answered
sorting an array in a specific order
x=[1 2 2.5 3 4 5]; y= 3.4; [~,is]=sort(abs(x-y)) x=x(is)

4 years ago | 0

| accepted

Answered
Genetic Algorithm for points External To a Specific Volume
You would have to use a non-linear constraint function for that: function [cineq,ceq]=nonlcon(x) x=reshape(x,3,[]); %reshap...

4 years ago | 0

| accepted

Load more