
Matt J
Professional Interests: medical image processing, optimization algorithms
PLEASE NOTE: I do not read email sent through my author page. Please post questions about FEX submissions in their respective Comments section.
Statistics
ランク
6
of 258,335
評価
24,174
貢献
216 質問
9,425 回答
回答採用率
74.54%
獲得投票数
3,176
ランク
of 110,436
貢献
0 問題
0 解答
スコア
0
バッジ数
0
貢献
0 投稿
貢献
0 パブリック チャネル
平均評価
貢献
3 Highlights
AVERAGE NO. OF LIKES
2
Content Feed
Create and lock a struct with fields in a class
One way: classdef myclass properties x = struct('a',0,'b',1); end methods function obj...
約5時間 前 | 0
How to optimize an objective function with strict inequality constraints?
The original problem with the unnecessary 240 term dropped is, Objective function =x(2)*(-10)-x(1)*70+240 subjected to...
約5時間 前 | 0
calculating the mean for each column in a numerical array based on the elements in column 1
Let's call your matrix A. Then, out = splitapply(@(z) mean(z,1),A,A(:,1));
1日 前 | 2
Optimization when solving equation system
fmincon with a nonlinear constraint would probably work, although because your constraint is non-differentiable, strictly speaki...
1日 前 | 0
Setting up linear optimization problem
X=rand(100,1); Y=rand(100,1); timeit(@()doOptimization(X,Y)) function doOptimization(X,Y) fun=@(M)objective(M,...
1日 前 | 0
| 採用済み
Why is x(:) so much slower than reshape(x,N,1) with complex arrays?
I was just told by Tech Support that the issue was fixed in R2022a, but it doesn't appear that way: Nx = 256; Ny = 256; Nz = ...
3日 前 | 0
送信済み
Absolute Orientation - Horn's method
Solves weighted absolute orientation problem using Horn's quaternion-based method.
4日 前 | ダウンロード 26 件 |
How to do quadratic interpolation in two dimensions on a plane
I realize the interp2 is a linear interpolation technique No, you have several alternatives to linear interpolation with inter...
4日 前 | 0
| 採用済み
How to loop through each row of a column, then loop through the remaining columns?
If your group1_responses is a cell or string array, there is no need to distinguish between rows and columns at all. Just do, g...
4日 前 | 1
Problem in defining the fit type function for curve fitting tool
fittype( @(nu,numGaussians,a,sigma) SCR(nu,numGaussians,a,sigma),'independent','nu')
5日 前 | 1
What is the recommended way to pass long list of parameters between main workspace and function?
In the case of your posted example, the appropriate re-implementation would be, a=1:5; result=calcvalues(a); function accum...
5日 前 | 0
Update multiple values in a struct array
You can do it in 2 lines, C=num2cell([S.value]+5); [S.value]=deal(C{:})
5日 前 | 0
Update multiple values in a struct array
No, but easy enough to make one: [s(1:2).f]=deal(1,2); s.f s=incremStruct(s,'f',5); s.f function S=incremStruct(S,field...
5日 前 | 0
how does the xcorr fun works and what is the difference between corr and xcorr?
What xcorr is computing is described here, https://www.mathworks.com/help/matlab/ref/xcorr.html#mw_ff426c84-793b-4341-86f0-077e...
5日 前 | 0
how to plot only non zero value of a slicing of a 3d matrix?
a(~a)=nan; plot(a(:,:))
5日 前 | 0
| 採用済み
Cosine similarity between two matrices
I tend to prefer pdist2, UV=[U(:),V(:)]; D=1-pdist2(UV,UV,'cosine')
5日 前 | 0
Constrained optimization of a vector
You have two equations so, as long as numel(a)=2 and f1 and f2 are differentiable, you can use fsolve. If numel(a)>2 then you ha...
5日 前 | 0
Fourier transform of a rectangular pulse
It's always good to decide on both your time and frequency sampling axes first, before doing any FFT processing. For a pulse wid...
5日 前 | 0
Plot plane using a line and a point?
x1=86;y1=115;z1=11420; x2=167;y2=70;z2=9240; x3=167;y3=115;z3=9240; p=null([x1,y1,z1,1; ... x2,y2,z2,1; ... ...
6日 前 | 0
| 採用済み
Is the 8th term maximum in the curve fitting toolbox and command line?
Perhaps just do an FFT decomposition and select the 10 strongest frequencies.
6日 前 | 0
Is the 8th term maximum in the curve fitting toolbox and command line?
You will probably have to use a custom model, or else resort to lsqcurvefit().
6日 前 | 0
How to limit variables in input function?
It does not make sense to have a tilde as an input argument in a function call. Perhaps you meant, tcfun3(1,P_min11 (j), T, 1)...
6日 前 | 0
I want to compare each element in 2 matrix same size and display a text in every case.
A=[1 2 3 4 5]; B=[2 4 9 8 2 ]; t=["no", "yes"]; t((A<B)+1)
6日 前 | 0
| 採用済み
Are recursively defined or nested anonymous functions dangerous?
I don't know about dangerous, but it is definitely inefficient and harder to debug. It will run much faster if you just implemen...
6日 前 | 0
| 採用済み
質問
Save LiveScript as an MS Word document, but keep the equations editable
When I save a Live Script as a Word .docx file the equations are all converted to images, and therefore are not editable. Is th...
7日 前 | 0 件の回答 | 0
0
回答String array to matrix
Here's an example with comma separators instead of tabs, but it would work the same way. a=["1,2";"3,4"] c=arrayfun(@(z)st...
7日 前 | 0
| 採用済み
Converting a system of coordinates
You need to measure the position of at least three non-colinear 3D points in both coordinate systems. Then, you can find the map...
8日 前 | 0
Extract sub array from d-dimensional array given indices for each dimension
If you have your vd_i in a cell array V={vd_1,vd_2,...,vd_d}, you can do A(V{:})
8日 前 | 0
| 採用済み
How to count numbers greater than a determined value
out = cumsum( histcounts(heights,0.5:0.1:100-eps(100)) ,'reverse');
8日 前 | 0
| 採用済み