답변 있음
intersection between a many plots and a line
You could use linexlines2D from this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/93470-intersections-of-...

대략 3년 전 | 0

답변 있음
using a matrix in a calculation
Use element-wise operators .*, ./, and .^

대략 3년 전 | 0

답변 있음
Interpolate Nan values in timetable
You could use movmean, like in this example, https://www.mathworks.com/help/matlab/ref/movmean.html#bu6jxup

대략 3년 전 | 0

답변 있음
Problem: Image segmentation of forest area using CNN and MATLAB's BLOCKPROC function.
I would implement fun as a non-anonymous function. Then, you can stop inside the function and inspect the result: C = blockproc...

대략 3년 전 | 0

답변 있음
Vectorised form and inverse of matrix
The vectorised form I wrote to reduce time looks like this: You should be able to see if it's correct by comparing hte output o...

대략 3년 전 | 0

답변 있음
[Optimization] fmincon not respecting nonlinear constraints
The maths is irrelevant. In short, the nonlinear constraint function takes the program variable vector P, does some nonlinear st...

대략 3년 전 | 0

답변 있음
How can I colour data points based on 3 inputs?
Since you don't seem to want a connecting line in your data points (LineStyle='none'), a scatter plot would probably be more app...

대략 3년 전 | 0

답변 있음
Applying Quantization Matrix in which specific coefficients are zero'd out
One way would be to set Q_matrix to twice the maximum of blocks_dct. That will ensure that the floor() operation zeros them. A...

대략 3년 전 | 0

| 수락됨

답변 있음
If I have tow arrays and I want to find the max value in these two arrays with eachother how I can find that
f=@(u) -( cos(n).*sin(u)+sin(f).*cos(u) ); u0=linspace(0,2*pi,1e5); [~,i]=min(f(u0)); umax = fminsearch(f,u0(i)) %the r...

대략 3년 전 | 0

답변 있음
adding a zero element in a specific location in array (between two elements)
C=A; C(logical(A))=B; %C is the result

대략 3년 전 | 0

답변 있음
Optimizing a function for a given set of data
The function is a first order polynomial in . You can use roots to find where f()=0, or just solve by hand.

대략 3년 전 | 0

답변 있음
3d Curve for 3 vectors
Data=[x(:).';y(:).';z(:).']; w=width(Data); XYZ=num2cell(spline(1:w,Data,linspace(1,w,10*w)),2); plot3(XYZ{:});

대략 3년 전 | 0

답변 있음
Intersection of two vector lines
where a,b and s is a 3x1 matrix? I assume you really mean that a,b,u,c,d,v are 3x1 and t,s are scalars. ts=[b,-d]\( v-u ); ...

대략 3년 전 | 0

| 수락됨

답변 있음
trivial matrix question: how to rearrange matrices in a given order
You can use blkColon in this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/115340-block-transposition-perm...

대략 3년 전 | 0

| 수락됨

답변 있음
Trying to find error value in FFT compuation
It's very simple. This line has nothing to the right of the '=' sign. errYYinv = ;

대략 3년 전 | 0

답변 있음
Summing array elements seems to be slow on GPU
So it looks like the summation is the most time-consuming operation on GPU. Is that an expected result? That's what I would ex...

대략 3년 전 | 0

답변 있음
Graphing an array so the largest row graphs first and then so forth
IMHO, it's better just to assign distinct markers: x=[1,8,15,NaN,NaN; 1,8,15,22,29; 1,8,15,22,NaN]; y=[0,0,0,NaN,NaN; 0,0,0,2,...

대략 3년 전 | 1

답변 있음
How to evaluate 3D spline at given z points?
[x,y,z]=deal(x(:),y(:),z(:)); %ensure column vectors zyx=num2cell( sortrows([z,x,y],1) ,1);%sort according to z [z,y,x]=de...

대략 3년 전 | 0

답변 있음
Channel-wise convolution deep learning layer for 1d and 3d data i.e. groupedConvolution1dLayer, groupedConvolution3dLayer
A 1D image is a special case of a 2D image, so you should be able to use groupedConvolution2dLayers for the 1D case.

대략 3년 전 | 1

| 수락됨

답변 있음
How to create stacked bar plot where each stack is of equal height and filled partially to user desired value ?
height=1; y=rand(4,1); B=bar([y,height-y],'stacked'); axis padded B(2).FaceColor='none';

대략 3년 전 | 0

| 수락됨

답변 있음
Inconsistent training loss curve when training UNet with and without convergence criterion
There should be a change in the training loss curve - it should be shorter. By loosening the stopping criteria, you cause fewer ...

대략 3년 전 | 0

답변 있음
Initializing arrays of objects with distinct handle properties
You can also rewrite the Junk1() constructor to generate array-valued output: classdef Junk1 < handle properties(GetAccess...

대략 3년 전 | 0

| 수락됨

답변 있음
Initializing arrays of objects with distinct handle properties
One way: x=arrayfun(@(z)Junk1,ones(3,1)) x.prop1 x = 3×1 Junk1 array with properties: prop1 prop2 an...

대략 3년 전 | 0

답변 있음
How to smooth binary image
load BWImage; BW=(1-entropyfilt(BW,ones([11,5]))); BW=imclose(BW,ones([11,1])); BW=bwareaopen(BW>0.2,20); imshow(BW...

대략 3년 전 | 0

| 수락됨

답변 있음
sort properties alphabetically in variable preview not working
You cannot change the order in which properties are displayed in the variable editor (other than to reverse it). If you want an ...

대략 3년 전 | 0

답변 있음
How to compute shortest path in Graph ?
You can use the shortestpath command.

대략 3년 전 | 0

답변 있음
Convert 4 numbers of 2D image frame to 3D
cat(3,im1,im2,im3,im4)

대략 3년 전 | 0

답변 있음
Insufficient number of outputs from right hand side of equal sign to satisfy assignment.
Possibly, you've done something like this within the method() function: out={1,2}; [a,b,c]=out{:}

대략 3년 전 | 0

답변 있음
How to find vector in array of vectors with the highest value of one component?
If I assume that p is an Nx4 array, then, [~,row]=max(p(:,2)); result=p(row,1:3)

대략 3년 전 | 0

| 수락됨

답변 있음
fmincon optimization not running properly, stops beacuase of StepTolerance
It should give back 0.450; -0,005; -0,005. If you have that foreknowledge, you should apply lb and ub bounds as I have done bel...

대략 3년 전 | 1

더 보기