답변 있음
fminunc undefined at initial points
It looks like there are some parentheses in the wrong place. I'm betting the cost was supposed to be, J = -( y'*log(tmp_sig...

대략 3년 전 | 0

답변 있음
Exclude some nodes from a 3D point cloud (select only neighboring nodes)
X=load('selection').selection; %shorten data name G=graph(pdist2(X,X)<=10); T=conncomp(G); [~,i]=max(histcounts(T,[uniq...

대략 3년 전 | 0

| 수락됨

답변 있음
Adding fields of two different structs together
It would be a better to use a dictionary than a struct, part=dictionary(["x","y","z"],1:3); part("x")+part("z")

대략 3년 전 | 0

| 수락됨

답변 있음
How to capture the view in volshow as an image?
I'm still interested as to whether or not there's a way to create an image in a figure of the current view so that you could uti...

대략 3년 전 | 1

답변 있음
How do I do this summation equation in MATLAB
Looks like you could simply do it in one line with, eta=vecnorm(Y(:,1:N/2),2,2).^2/N ;

대략 3년 전 | 0

| 수락됨

답변 있음
Shifting an array without circshift
circshift is not doing anymore than indexing into the array like below, so you could do that directly. x=1:10; xshift = x([e...

대략 3년 전 | 0

답변 있음
How to save volshow(data,config) as fig or img [volumeViewer]?
See this related thread, https://www.mathworks.com/matlabcentral/answers/1960414-how-to-capture-the-view-in-volshow-as-an-image...

대략 3년 전 | 1

답변 있음
Big struct variable to be shared by multiple functions/procedures. Global variable or not?
but I am wondering if this could be an exception I am not sure why you think it would be an exception. A big advantage of packi...

대략 3년 전 | 0

답변 있음
There is a 1:1 mapping between the points in 2 separate 3D spaces. How do I pick a new point in one space and interpolate what the point will be in the other space?
If you have a parametric model for the 1-1 mapping, it might be a good idea to perform a fit to the model using e.g., lsqcurvefi...

대략 3년 전 | 1

답변 있음
There is a 1:1 mapping between the points in 2 separate 3D spaces. How do I pick a new point in one space and interpolate what the point will be in the other space?
If your data is gridded, use griddedInterpolant. Otherwise, if it is scattered, use scatteredInterpolant. Since you are interpol...

대략 3년 전 | 1

| 수락됨

답변 있음
Obtain Hessian matrix from a sum of squares expression
x=optimvar('x',[64,64]); Objective=0.0010309*x(11, 7)*x(13, 9) + 0.0016748*x(15, 11)*x(13, 9) + 0.0025*x(12, 7)*x(14, 9) + ...

대략 3년 전 | 0

| 수락됨

답변 있음
How to find the maximum value of two variables of a function in MATLAB
Your function z is separable and monotonically decreasing in both variables. So, it should come as no surprise that the smallest...

대략 3년 전 | 1

질문


Copy/paste over Remote Desktop
I often work on Matlab remotely using Windows' Remote Desktop. When doing so, I find that I can cut/copy items from Matlab's Cur...

대략 3년 전 | 답변 수: 1 | 1

1

답변

답변 있음
Find locations of a value in 3-D matrix (lat x lon x time) and take the two time steps before and after those selected values
One way: sz=size(ls); [I,J,K]=ind2sub(sz, find(ls) ); A=precip(sub2ind(sz,I,J,K-2)); %2 hours before B=precip(sub2ind...

대략 3년 전 | 0

답변 있음
Cell arrays with a vector within a cell within a cell
Maybe this is what you mean? C_in={[1;2;3],[4;5],6} n=max(cellfun('length',C_in)); C_out=num2cell(cell2mat( cellfun(@(x) ...

대략 3년 전 | 0

| 수락됨

답변 있음
Cell arrays with a vector within a cell within a cell
Is this what you mean? C_in={{[1;2;3]},{[4;5]},{6}} C_out=[C_in{:}]

대략 3년 전 | 0

답변 있음
my nonlinear constraints HAVE to be satisfied, what to do next?
(1) It is not possible to enforce equality constraints (e.g. Snell's Law) exactly , whether linear or non-linear. This is true b...

대략 3년 전 | 0

| 수락됨

답변 있음
How to capture the view in volshow as an image?
There are programmatic ways to take a screenshot, e.g., https://www.mathworks.com/matlabcentral/fileexchange/24323-screencaptur...

대략 3년 전 | 0

| 수락됨

답변 있음
trying to solve a system of 6 non linear equations to derive 6 unknown variables in terms of other known variables
It seems quite unlikely to me that the system has a symbolic solution.

대략 3년 전 | 0

답변 있음
How to make a polyfit with constraints to the first and second derivative?
More often than not, if you have such constraints, it is spline that you want to fit, not a polynomial. Constrained spline fits ...

대략 3년 전 | 1

| 수락됨

답변 있음
How to make a polyfit with constraints to the first and second derivative?
Well they are just linear constraints on the coefficients, so you could use lsqlin if you have the Optimization Toolbox.

대략 3년 전 | 0

답변 있음
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년 전 | 0

답변 있음
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년 전 | 0

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

대략 3년 전 | 1

| 수락됨

답변 있음
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년 전 | 0

| 수락됨

답변 있음
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년 전 | 0

답변 있음
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년 전 | 0

답변 있음
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년 전 | 0

| 수락됨

답변 있음
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년 전 | 1

더 보기