Réponse apportée
Draw a curve defining the bounds of a scatter plot to detect anomalous (sparse or low density) points
Sets=["xy1" "xy2" "xy3" "xy4"]; Factors=[20,20,5,5]; for i=1:numel(Sets) xy=load(Sets(i)).(Sets(i)); ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Pass existing object to different class objects
It will be a "pointer", until you make a change to one of the shared copies. Then, the specific property variables that you chan...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Problem 2022. Find a Pythagorean triple
function flag = isTherePythagoreanTriple(a, b, c, d) X=[a,b,c,d]; X=X(nchoosek(1:4,3)); flag=any( X...

presque 3 ans il y a | 0

Réponse apportée
Problem 2022. Find a Pythagorean triple
function flag = isTherePythagoreanTriple(a, b, c, d) a2=a^2; b2=b^2; c2=c^2; d2=d^2; if a2+b2==c2...

presque 3 ans il y a | 0

Réponse apportée
sorting by foor loops
You have many choices, https://en.wikipedia.org/wiki/Sorting_algorithm

presque 3 ans il y a | 0

Réponse apportée
Finding exact point on the surface
z = fzero(@(z)y-f(x,z), [z1,z2])

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Parallelizing For Loops - Issue
I would use parfor just to run the n gurobi optimizations. After you've collected all the results in a struct array Results(jr),...

presque 3 ans il y a | 1

Réponse apportée
Using rdivide for multidimensional matrices
Using the KronProd class, downloadable from here, https://www.mathworks.com/matlabcentral/fileexchange/25969-efficient-object-o...

presque 3 ans il y a | 0

Réponse apportée
Using rdivide for multidimensional matrices
One way: Fp=permute( F([1,3,5],[2,4,7],:), [1,3,2]); Fp_transformed= pagerdivide( Fp , basisVectorMat); F_transform...

presque 3 ans il y a | 0

| A accepté

Question


A MEX solution to split classdef-defined object arrays into cells
As an experiment with MEX files, I am trying to create a mex routine that will take an array A of classdef-defined objects and r...

presque 3 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
I don't know why you're saying it's an invalid expression. Help me
Perhaps you intended to have this, y1=sin(x.^2); y2=cos(x).^2;

presque 3 ans il y a | 0

| A accepté

Réponse apportée
trainNetwork - training data format
With your imageInputLayer network, try, XTrain =reshape(XTrain.', 24,1,1,N); so that the format of the input is SxSxCxB.

presque 3 ans il y a | 0

Réponse apportée
fmincon with handle function input
The problem is that it is not an explicit function, so it seems that fmincon never stops finding the minimum It is possible th...

presque 3 ans il y a | 1

Réponse apportée
How to rotate a pointcloud data and align parallel with y-z axis?
yz=readmatrix('CS_DATA.xls','Range',[1,2]); [~,v1]=min(yz*[+1;+1]); [~,v2]=min(yz*[-1;+1]); [x1,y1,x2,y2]=deal(yz(v1,1), ...

presque 3 ans il y a | 2

| A accepté

Réponse apportée
New toolbox not listed in installation options
Try re-downloading the installer.

presque 3 ans il y a | 0

| A accepté

Réponse apportée
xcorr always gives best aligment of 0 (which by visual inspection is wrong)
Here's another possible comparison criterion where the signals are pre-normalized so that their minimum values are zero. load ...

presque 3 ans il y a | 0

Réponse apportée
xcorr always gives best aligment of 0 (which by visual inspection is wrong)
You could look for an optimal cyclic shift load y1y2; N=numel(y1); r=ifft( fft(y1).*conj(fft(y2)) ,'symmetric'); [~,t]...

presque 3 ans il y a | 0

Réponse apportée
Solve Linear Equation with Constraints on Variables
You can use trustregprob from this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/53191-quadratic-minimizat...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
xcorr always gives best aligment of 0 (which by visual inspection is wrong)
Visually it can be seen that maximum correlation is at aligment ~30000 I'm afraid not: load y1y2; x=1:numel(y1); y3=inte...

presque 3 ans il y a | 0

Réponse apportée
xcorr always gives best aligment of 0 (which by visual inspection is wrong)
It is not clear how corrcoeff would allow you to align the two curves. Perhaps you intended to use xcorr.

presque 3 ans il y a | 0

Réponse apportée
series computing is faster than parallel computing using parfor
Assuming you are on a local parpool, it is never clear whether parfor will be faster than a serial loop. You are dividing the lo...

presque 3 ans il y a | 0

Réponse apportée
Difference between lsqlin (using IP-algorithm) and fmincon (using IP-algorithm)
Your linear least squares cost function is highly ill-conditioned. Essentially, I_BB_solve is a singular matrix. >> cond(I_BB_s...

presque 3 ans il y a | 0

Réponse apportée
How do I use surf on a specific set of points
You can use trisurf. This requires you to decide upon the triangle connectivity, but many people just use the Delaunay triangula...

presque 3 ans il y a | 0

Réponse apportée
How to model affine cone constraint using secondordercone() with coneprog() solver?
Perhaps as follows: socConstraint.A=blkdiag(A,constant); socConstraint.b=zeros(n+1,1); socConstraint.d=[d;0]; socConstraint....

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Use My Own Interpolation Function to Find the Coefficients
Since your model function is a 3rd order polynomial, you can use polyfit to find the coefficients. Then you can use polyval to e...

presque 3 ans il y a | 0

Réponse apportée
Number of input parameters in Superclass method
My design would be as below. classdef Superclass properties params %now a struct doe prop1 ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Comparison between two vectors and locate the error
A=[ 5 2 -3 4 ]; B=[ -3 2 2 4 ]; locations = find(A~=B)

presque 3 ans il y a | 0

Réponse apportée
Unreconized function or variable
vR is never defined because none of your switch cases are ever satisfied. One solution: switch diode %%% SWITCH CODE HER...

presque 3 ans il y a | 0

Réponse apportée
how many input parameters to the pass function
Why not just pass the entire app object? function CalcolaButtonPushed(app, event) app.EquityUnfilteredCheckBo...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to use least square fit to 2D matrix data
[~,location]=min(Data);

presque 3 ans il y a | 0

Charger plus