Community Profile

# Matt J

Last seen: 1 jour il y a Actif depuis 2009

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.

All

#### Content Feed

Afficher par

A répondu
How can I efficiently use an array of patterns to create figure titles?
One possibility: regNames = ["Anterior HPC" "Posterior HPC" "Amygdala" "Enthorinal Cortex" "Pararhinal cortex"]; pats = "u" + ...

environ 20 heures il y a | 1

A répondu
2D matrix transformation (Brown-Conrady distortion model) fitting
You can use lsqcurvefit if you have the Optimization Toolbox.

environ 21 heures il y a | 0

A répondu
As you can see from the plot, the root lies quite close to solution, so fzero succeeded. If this violates your expectations, it ...

1 jour il y a | 0

Question

Why is it forbidden to call a superclass method from a subclass function of a different a name?
I tried the thing in the screenshot below, i.e, to call the super-class method getThis() within the sub-class method someFunc()....

1 jour il y a | 1 réponse | 0

### 0

réponse

A répondu
How to find the line of intersection between the following two planes and plot the intersected line on the same two planes?
You can get the line of intersection in Dual Plucker Matrix form as follows: A=null([[P11;P21;P31],ones(3,1)]); %plane 1 B=...

1 jour il y a | 0

| A accepté

A répondu
Length of lower bounds is < length(x); filling in missing lower bounds with -Inf. Problem is unbounded
A=readtable('4times6249datacsv'); A=table2array(A); f=sum(A,2); Aeq =ones(1,4); beq = 1; lb = zeros(4,1) ; a = linpro...

1 jour il y a | 0

A répondu
Maximization problem in MATLAB Optimisation Toolbox
Will it work same here? Yes. Example: fun=@(x) -x^2; %maximize this xmax=fmincon( @(x) -fun(x) , 1) It worked!! But anoth...

1 jour il y a | 0

A répondu
Given a quadrilateral image, not necessarily a rectangle, how to find its top left point's x-y coordinate
You can use pgonCorners from https://www.mathworks.com/matlabcentral/fileexchange/74181-find-vertices-in-image-of-convex-polygo...

1 jour il y a | 0

A répondu
How to use Matlab Functions with Vector of Structures
m = min([struct.field1])

2 jours il y a | 0

| A accepté

A répondu
Defining objective functions appropriately
It depends what environment you are formulating the problem in. fmincon and fminunc will only minimize functions, so you cannot ...

2 jours il y a | 0

| A accepté

A répondu
Matrices multiplication (a*b)
By using a loop, and the definition,

2 jours il y a | 0

Question

Isn't it dangerous to allow Comma-Separated-List functionality in indexed assignments?
I have a function below called renamefields() which, as the name suggests, renames a desired subset of struct array fields as de...

2 jours il y a | 1 réponse | 0

### 1

réponse

A répondu
How to get comlex root of an equation using fminbnd?
fminbnd is for minimzing over a 1D interval. It's not clear to me how you are defining 1D interval bounds for a number that does...

3 jours il y a | 0

A répondu
Issues in the constraint functions of the Optimization Problem solving
function [c,ceq]= area(x0) M=5; % x0=[5,8]; M2=m(M,x0(1)); M3=m(M2,x0(2)); M4=m(M3,(x0(1)+x0(2))); beta1=b(M,(x0(1)))...

3 jours il y a | 0

A répondu
collapsing rows of a cell array into a single cell
Data2=num2cell(Data,1); However, I wonder why you would want to do this. Matrices are usually faster to manipulate than cells, ...

4 jours il y a | 0

| A accepté

Question

How many columns can the input to the JacobianMultiplyFcn have?
I am using the JacobianMultiplyFcn option of lsqnonlin. The documentation says that JacobianMultiplyFcn is to be a handle to a f...

4 jours il y a | 1 réponse | 0

### 1

réponse

A répondu
fsolve with two variables in a loop
fun=@(z)[fx(z(1),T(j));fy(z(2),T(j))];

4 jours il y a | 0

| A accepté

A répondu
w=(hr'*Theta*G +hd')'; w=sqrt(P)*w/norm(w);

5 jours il y a | 0

| A accepté

A répondu
Split one table into multiple tables based on multiple variables without reordering.
T=readtable('Data - 2023-01-26_question'); G=findgroups(T(:,1:2)); I=(1:numel(G))'; splitTables = splitapply(@(i){T(i,:)}...

5 jours il y a | 0

| A accepté

A répondu
Upper bound curve that passes through the extreme (highest) points
load D_by_t_u; load surge_height_1m; final_mat = []; for i = 1:length(surhe_height_1m) if surhe_height_1m(i) > 0.02 ...

5 jours il y a | 0

| A accepté

A répondu
How do I multiply the numbers in a 2D array using a for loop, must be a for loop as part of the course requirements
One way: A3=nan(size(B)); for i=1:size(B,2) A3(:,i)=sind(B(:,i)).^2; end

5 jours il y a | 0

| A accepté

A répondu
How to solve "Conversion to logical from optim.problemdef.OptimizationEquality is not possible." ?
This will solve the "Conversion to logical" error, but not all of the other issues raised by Torsten and me. In particular, Gene...

5 jours il y a | 0

| A accepté

A répondu
How to simplify too much of if
FP=[39 45 33 36 27 30, 29,33,24,28,20,24,... 41 46 34,38,29,32,32,36,25,30,22,25,36,49,38,41,31,34,35,39,.... 29,32,24...

5 jours il y a | 0

A répondu
Why DerivativeCheck would be allowed to be on while there is no GradObj?
Here's a reason why you might want to allow DerivativeCheck to be on even when the analytical gradient computations are all off....

6 jours il y a | 0

| A accepté

A répondu
Why DerivativeCheck would be allowed to be on while there is no GradObj?
So why would MATLAB allow the DerivativeCheck to be on if there is no gradient available? Because maybe SpecifyConstraintGradie...

6 jours il y a | 0

A répondu
Effect of zero padding on FFT amplitude
@Rahul Kale It occurs to me now that you are not really trying to compute the Fourier transform of a finite signal. You are inst...

6 jours il y a | 0

| A accepté

A répondu
Way to solve AX=XB
[ma,na]=size(A); [mb,nb]=size(B); %size(X)=[na,mb] X=null( kron(speye(mb),A) - kron(B.',speye(na)) ); X=reshape(X,na,mb...

7 jours il y a | 0

A répondu
Why DerivativeCheck would be allowed to be on while there is no GradObj?
I would say that no warning is strictly necessary because one of two cases are possible: (1) DerivativeCheck='on' was intention...

7 jours il y a | 0

A répondu
How to create a Aij matrix with the commands 'for', 'function output=name_of_code' and 'imagesc'?
m=100; n=150; A=((1:m)'-(1:n)).^2; for i=1:min(m,n) A(i,i)=2*i.^2; end imagesc(A)

8 jours il y a | 0

| A accepté

A répondu
How to create a Aij matrix with the commands 'for', 'function output=name_of_code' and 'imagesc'?
I don't know how to do it and I didn't find any example. Not even here? https://www.mathworks.com/help/matlab/ref/for.html#bu...

8 jours il y a | 0