Submitted


Block transposition, permutation, and reshaping of arrays
Analogues for transpose(), reshape(), and permute() but where sub-blocks of the array are treated as scalar elements.

2 years ago | 1 download |

5.0 / 5

Question


Why is it that Line objects can be instances of two different classes? How can I use findobj to detect only chart primitives?
Using findobj, I have ended up with two arrays of Line graphics handles, load handleArrays hL hD However, the arrays do ...

2 years ago | 2 answers | 1

2

answers

Answered
How to modify subplots to create a new subplots?
close all H(1)=openfig('pac4.fig'); ax1=flip(findobj(H(1),'Type','axes')); H(2)=openfig('pvc4.fig'); ax2=flip(findobj(H(2)...

2 years ago | 0

| accepted

Answered
Store arrays of different size in each for loop itertaion
kkk=cell(4,1); for i=1:4 kkkk{i} = find(A>=sz(i,1) & A<=sz(i,1)+100); end kkkk=vertcat(kkkk{:});

2 years ago | 0

| accepted

Answered
Using imageDatastore to load Input image and get output as predicted image
and predict an image as output of the model. Labels are text scalar that are assigned to an image in a classification problem....

2 years ago | 0

Answered
Most time-efficient conversion from logical matrix to fixed-point vector
n = 1e6; % number of fi objects m = 16; % number of bits of each fi object tic; A = randi([0,1], [n m], "logical"); t1 = toc...

2 years ago | 1

| accepted

Answered
Tracking the variation of the distance between optimization variable and the optimal solution over the iteration time
function x_opt = locao2(h, C, BS_positions, alpha,x0) objective = @(x) -calculatePDF(x(1), x(2), h, C, BS_positions, alph...

2 years ago | 0

Answered
Help with getting drawnow to show one point at a time
The loop variable i is not being used, Perhaps you meant to have, for i = 1:numel(roll) plotOrientation(op, roll(i), ...

2 years ago | 0

| accepted

Answered
The sufficient and necessary conditon of fmincon funciton can find out the global optimal solution but not some other local optimal solutions
fmincon has no awareness of, and so does not consider, the function's global properties, like whether it is convex or not. It on...

2 years ago | 0

| accepted

Answered
What is the finite nature of MATLAB?
It is not the finite nature of Matlab, but rather the finite nature of an FFT. You are not transforming a true sinc function bec...

2 years ago | 1

| accepted

Answered
Overloading subsrefs for class and using it from another method in the same class
As an alternative to subsref or set/get, you could look at RedefinesDot, but I find that the newer, modular indexing can have su...

2 years ago | 0

| accepted

Answered
Overloading subsrefs for class and using it from another method in the same class
No, subsref is only called by indexing operations invoked outside the classdef. This design decision was to avoid triggering rec...

2 years ago | 0

Answered
Passing Structure through fminsearch
If p is the unknown parameter vector, it must be passed separately from the fixed parameters, S.PHI=... S.TAU=... [p...

2 years ago | 0

| accepted

Submitted


ezplane
Plot an arbitrary 3D plane given its equation.

2 years ago | 2 downloads |

0.0 / 5

Answered
multiple 3D plane plotting
Using this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/161351-ezplane planedip = 30; planeazim = 12...

2 years ago | 0

| accepted

Answered
Why do i get "Error using vertcat Dimensions of arrays being concatenated are not consistent" while using fmincon to do nonlinear optimization
However, as i searched, it seems appear for error in matrix calculation. there really isnt matrix calcualtion in my codes Certa...

2 years ago | 1

| accepted

Answered
Volume of union and volume of intersection of convex hulls?
Use intersectionHull from this FEX download to find the intersection, https://www.mathworks.com/matlabcentral/fileexchange/3089...

2 years ago | 0

Answered
How can I define a custom loss function using trainnet?
If you have multichannel output, the loss function will give you an SSIM per channel, e..g, loss = @(Y,targets) 1-ssim(Y,target...

2 years ago | 0

Answered
MATLAB code of intersection
f=@(z) z(:,1:2)./z(:,3); t=(0:2:30)'; e=ones(size(t)); D=[cosd(t), sind(t), 0*e]; L1=cross(e*[0 0 1], D); L2=cross(e*...

2 years ago | 1

Answered
Constructing a 3D matrix out of single column coordinate data with a corresponding value
Let's call your Nx4 matrix XYZV. xyzv=num2cell(sortrows(XYZV,[3,2,1]) ,1); [I,J,K,V] =deal(xyzv{:}); I=findgroups(I); J=...

2 years ago | 0

| accepted

Answered
Constructing a 3D matrix out of single column coordinate data with a corresponding value
If you are trying to query velocity values at arbitrary 3D locations, do not use a 3D array. Instead, use scatteredInterpolant o...

2 years ago | 0

Answered
How to close a figure made in one function, from a different function
How do I define ax in function B so that I can close Plot A You don't. You create ax in function A (it is obtained from the pl...

2 years ago | 0

| accepted

Submitted


Grids of tiled chart layouts
A tool for simplifying the creation of nested tiled layouts

2 years ago | 1 download |

0.0 / 5

Answered
Merging files based on location similarity use polyshape and overlaps
The variable naming in your posted code doesn't reflect the terminology in your text explanation, making it hard to interpret. T...

2 years ago | 0

| accepted

Answered
Multiple ylabels for tiledlayout
One approach would be to create a 2x1 tiledlayout where inside each tile you nest another tiledlayout of dimension 2x6. You can ...

2 years ago | 0

Answered
lsqnonlin (lsqcurvefit , fmincon) does not change the variables in an optimization process to find the best fit
Consider the various recommendations at, https://www.mathworks.com/help/optim/ug/optimizing-a-simulation-or-ordinary-differenti...

2 years ago | 1

Answered
Loop through list of vectors (ie, the rows of a matrix), applying same "simple" function to each one, on GPU? Should I use arrayfun somehow?
Well whether you use the GPU or not, you don't have to loop across measurements. The operations in your example are trivial to v...

2 years ago | 0

| accepted

Question


Hovering in debug mode triggers a jump into get.property() methods
I have been experiencing an aggravating thing for the past several Matlab releases and for which I am looking for troubleshootin...

2 years ago | 1 answer | 1

1

answer

Answered
Delete Negative Duplicates from Array
X=randi(9,3,4); X=[X,-X(:,1:2)] map=triu(squeeze(~any(X+reshape(X,3,1,[]),1))); [I,J]=find(map); X(:,[I;J])=[]

2 years ago | 0

| accepted

Load more