Answered
How to group a matrix based on one column?
Usually i use unique() function and then check if my rows matches with unique value rows, then i group by this using for loop. ...

3 years ago | 0

Answered
to find root of transcendental equation
As from below program i need to confirm The roots are α = {2.7859,5.5215,7.9573} If you only need to confirm the roots, just pl...

3 years ago | 0

Answered
How to find the angle?
One way: dPt=normalize(Point2-Point1,'n'); angle=acosd(dPt(1)) %degrees

3 years ago | 1

| accepted

Answered
Generate random numbers with specific mean
You can use this FEX download https://www.mathworks.com/matlabcentral/fileexchange/9700-random-vectors-with-fixed-sum?s_tid=src...

3 years ago | 0

| accepted

Answered
How to do activation quantization of EACH LAYER in lgraph or dlnetwork?
Have you seen this already? https://www.mathworks.com/help/deeplearning/quantization.html

3 years ago | 0

Answered
How do I solve this non linear equation that requires user defined inputs for each variable and determine the value of K
Alternatively, recognize that, r=(I-I0)/(Ilim-I0) is a solution of the quadratic equation, c0*r^2 - (c0+c+1/K)*r + c=0 This ...

3 years ago | 0

Answered
Using string() on double values without automatic rounding?
even when there are more decimals in the original double value There are no more decimals in the original double value. A doubl...

3 years ago | 0

| accepted

Answered
How to apply Gaussian blur to a specific area (oval) in an image?
1.Make a logical mask of the oval 2. Erode the mask by 1 pixel (imerode) 3. Use imgaussfilt to filter the whole image 4. Re...

3 years ago | 1

Answered
Deriving isolation ranges of roots of nonlinear equation
This FEX download might be helpful https://www.mathworks.com/matlabcentral/fileexchange/78008-tools-for-processing-consecutive-...

3 years ago | 0

Answered
Compute Jacobian of a function using Automatic Differentiation
You can do so numerically using, for example, this: https://www.mathworks.com/matlabcentral/fileexchange/13490-adaptive-robust-...

3 years ago | 0

Answered
Zero out values in multiple fields of a struct
I would recommend a different data organization: S.Title = 'MyData'; S.Date = datetime('today'); S.ID=["ABC0500", "ABC0500", ...

3 years ago | 0

Answered
How to avoid linear indexing in operations involving matrices of different sizes
A = rand(3,3); B = rand(3,2); idx = logical([0 1 1; 0 1 1; 0 1 1]); C=B; C(:)=A(idx)+B(:)

3 years ago | 0

Question


Deep Learning Toolbox class hierarchy
I am looking for some kind of condensed overview of the Deep Learning Toolbox class hierarchy. There are many types of network o...

3 years ago | 1 answer | 0

1

answer

Answered
fmincon: any way to enforce linear inequality constraints at intermediate iterations?
Within your objective function, check if the linear inequalites are satsfied. If they are not, abort the function and return Inf...

3 years ago | 0

Answered
fmincon: any way to enforce linear inequality constraints at intermediate iterations?
Within your objective function, project the current x onto the constrained region using quadprog, fun=@(x) myObjective(x, A_i...

3 years ago | 0

| accepted

Answered
Efficient sum along block diagonals
I believe this works! If you want to put this into a separate answer I will vote for this! I'm glad, but if it does work, pleas...

3 years ago | 0

| accepted

Answered
Matrix / image rotation
Rotate the z data only. load test.mat phi = 45; z_r=imrotate(z,-phi,'crop'); map=~imrotate(~isnan(z),-phi,'crop'); z_...

3 years ago | 0

| accepted

Answered
How to index a matrix other than using curly brackets
Why not stack the T1x{i} into a 3D array, T1x=cat(3, T1x{:}); Indexing them would look like, T1x(:,:,i) and summing over i c...

3 years ago | 0

| accepted

Answered
Efficient sum along block diagonals
Using this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/115340-block-transposition-permutation-and-reshap...

3 years ago | 0

Answered
GPU out of memory issue appears with trainNetwork.
Then I tried a larger input data set, but get the out of memory error: If you make your data larger and larger, you will eventu...

3 years ago | 0

| accepted

Answered
Fitting PDE with lsqcurvefit with only part of the data
Can't you just modify your model function so that it solves the PDE over [0,20], but then discards solutioin points from [0,2.5]...

3 years ago | 0

Answered
How to use fread with sizeA involving 3D arrays?
One way: Data = fread(fid, [rows,inf], 'uint32', 'l'); Data=reshape(Data,rows,cols,[]);

3 years ago | 0

| accepted

Answered
lsqcurvefit with 2 points trouble
Change the units of your xdata to something more natural: xdata2 = (2e-5:2e-5:18e-5)*1e5; and then, ydata2 = [0.997 0.991...

3 years ago | 0

Answered
Generalized equation using multiple equation
[Hint: When Z = 0 I will get black curve; When Z = 0.5 I will get blue curve; When Z = 1 I will get red curve; When Z = 2 I will...

3 years ago | 0

Answered
Blocked images larger than a certain size will not render in Image Labeler
One other possible workaround is to convert the image to grayscale, e.g., using the ReadFcn property of the imageDataStore, for ...

3 years ago | 0

Answered
Sort coordinates in two directions at the same time
load data_coordinates tf=~isnan(x)&~isnan(y); [x,y]=deal(x(tf),y(tf)); [~,t]=sort( [lon-x(1),lat-y(1)]*[x(end)-x(1);y(e...

3 years ago | 0

| accepted

Answered
How can I plot a cube with different images projected on each face?
This looks like it will do what you describe: https://www.mathworks.com/matlabcentral/fileexchange/28581-imsurf-3d-images?s_tid...

3 years ago | 0

| accepted

Answered
Why do I receive the error message "sliceViewer requires 3-D grayscale(MxNxP) or 3-D RGB volume(MxNxPx3) with no singleton dimensions"?
I see nothing in your code that would be expected to access the numeric content of the DICOM files. You should probably be using...

3 years ago | 0

| accepted

Load more