Community Profile

Matt J

Last seen: Today
6,535 2009 이후 총 참여 횟수

Professional Interests: medical image processing, optimization algorithms

Matt J's 배지

세부 정보 보기...

참여 게시물
보기 기준

답변 있음
How to make specific elements of a matrix zero before nth element?
[m,n]=size(A); C=A.*((1:m).'>=B);

약 14시간 전 | 2

답변 있음
Trouble with struct indexing?
... to access a single element of field2. The layout of your struct variable is not clear. If, for example, you have a scalar s...

약 14시간 전 | 0

답변 있음
Union() operation adds hole to polyshape

약 17시간 전 | 0

| 수락됨

답변 있음
Approximate a log curve as linear to predict a value
idx=(P<=0.1); c=polyfit(log10(P(idx)),Q_p_1(idx),1); semilogx(P, Q_p_1, P,polyval(c,log10(P)),'x-' )

4일 전 | 0

| 수락됨

답변 있음
3D Array Rastering
I'm not sure from your description how this should generalize for different N, but perhaps this is what you want: >> N=2; Array...

4일 전 | 0

| 수락됨

답변 있음
Using fminsearch I want to plot the model function whose parameters I'm fitting at each iteration without the figure window stealing focus. How do I do this?
Stop invoking whatever command it is (figure(), axes() ?) that you are using to bring the figure into focus. Calling the plot co...

6일 전 | 0

답변 있음
Updating for loop boundaries in MATLAB
for i = 1:size(A,1)

6일 전 | 1

| 수락됨

답변 있음
Calculation of the gradient of a function in BFGS Quasi-Newton Algorithm
With respect to all the variables that are unknown.

6일 전 | 0

| 수락됨

답변 있음
matrix dimensions must agree error
Possibly a missing comma here, K=1/h^2*(2.*diag(ones(1,N+1))-diag(ones(1,N)-1)-diag(ones(1,N),1)); ...

9일 전 | 0

| 수락됨

답변 있음
Define a variable without assigning a value
Perhaps you are trying to do symbolic computations, https://www.mathworks.com/help/symbolic/performing-symbolic-computations.ht...

9일 전 | 0

제출됨

N-dimensional sparse arrays
Creates an N-dimensional sparse array object, for arbitrary N.

9일 전 | 다운로드 수: 48 |

답변 있음
How can I use 'Least Squares Solver and Jacobian' instead of 'fminunc'?
Assuming D_d is the Jacobian of myfun, it would be, while (sum(abs(beta_u-beta_d))>0.1 && counter< 500) initial_gues...

10일 전 | 0

답변 있음
How to view centers on a 3D image
One suggestion is to use this FEX file to display the 3D volume with high transparency https://www.mathworks.com/matlabcentral/...

11일 전 | 0

답변 있음
Comparing the performance of colon, loop, and cell indexing
I checked that it is indeed the case with the Run & Time feature. I don't know what that is, but the better test in any case i...

12일 전 | 2

답변 있음
Using 'fminunc', I receive Optimization completed because the size of the gradient is less than the value of the optimality tolerance.
If the problem doesn't have a solution satisfying the tolerance condition in your while loop (sum(abs(beta_u-beta_d))<0.1) the...

12일 전 | 0

| 수락됨

답변 있음
Join table with different lengths
innerjoin(Grouped_Weight_position{i},Country)

12일 전 | 1

답변 있음
Replace array elements with another small array using indexing
b=strrep( strrep(a,[1 4 1],3) ,[3 4 1],2)

14일 전 | 0

답변 있음
Split values in an cell array by using a threshold
One way, A_lower = cellfun(@(x) x(x<threshold), A, 'uni',0); A_upper = cellfun(@(x) x(x>threshold), A, 'uni',0);

14일 전 | 0

| 수락됨

답변 있음
How to solve this equation z = c sqrt(x) ?
c=z/sqrt(x)

15일 전 | 0

답변 있음
Too many output argument error while using nested functions?
The code you've posted does not make it clear what problem you are encountering. There doesn't appear to be anything wrong in th...

15일 전 | 1

| 수락됨

답변 있음
How to multiply a scalar with matrix within loop and for each iteration store the values in new matrix?
There is no need for a loop: C=A.*reshape(b.^(0:n-1),1,1,[]);

15일 전 | 1

| 수락됨

답변 있음
Function lsqnonlin() has no optimization effect
And I have another question. My code has no optimization effect In this case, your initial guess already is optimal. You can se...

15일 전 | 0

답변 있음
Linear Extrapolation with interp2
The only remedy I can think of is to pre-pad the edges of the data V with linearly extrapolated values at distant X, Y. That way...

17일 전 | 0

답변 있음
overlaps() with only two polyshap objects
Use the two-argument form, Obstacles=[obstacle3 obstacle2]; criterion = sum( overlaps(car,Obstacles) ) == 1 ; %true if one a...

17일 전 | 0

| 수락됨

답변 있음
Constraints on meshgrid. Remove points outside function
Just apply logical indexing on the appropriate region and set it to NaN, bad=(y<s11(s2)) | (y>s12(s2)); z(bad)=nan;

17일 전 | 0

| 수락됨

답변 있음
How to run a curve approximation on a script using a function defined in a file and display the goodness of fit in a command window
You can't use the curve fit tool for a curve defined in an mfile. You can use lsqcurvefit, if you have the optimization toolbox,...

17일 전 | 0

| 수락됨

답변 있음
Parallel Processing with Multipul GPUs - fftn
You can use gpuDevice() to select different GPUs for different calculations. gpuArray commands run asynchronously without blocki...

18일 전 | 0

답변 있음
optimization based upon another optimization
You can write anything you want inside the code for your objective function, including other optimization processes. However, fm...

19일 전 | 0

질문

Finding handles to figure text
I am attempting to use findobj to retrieve text objects in a plot. For some reason, this fails (R2018a,b). In the following exam...

20일 전 | 답변 수: 1 | 0

1

답변

답변 있음
fmincon nonlinear equality constraint
wopt = fmincon(NegPFMu, w0, [], [], Aeq, beq, lb,[], @(w) mycon(w, Cov, TargetVariance)); function [c, ceq] = mycon(w, Cov, T...

21일 전 | 1

| 수락됨