Community Profile # Matt J

Last seen: Today 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

보기 기준

답변 있음
create a normal plane passing through a point P knowing the coordinates of the direction of the Normal vector to point P
a=normal(1); b=normal(2); c=normal(3); d=dot(normal,P); fimplicit3(@(x,y,z) a*x+b*y+z*c-d )

대략 7시간 전 | 1

답변 있음
Is there a classdef startup/initializer method?
As one example, you can initialize a property with a class-related function like below. Various other options are discussed here...

4일 전 | 0

| 수락됨

답변 있음
How to handle cells?
I would use logical arrays instead of cells. r = 'r'; s = 's'; p = 'p'; d = "Its a Draw!"; u1 = "User1 wins!"; u2 = "User2 wins...

4일 전 | 0

| 수락됨

답변 있음
how to use varagin with parameter
Another possibility: out=definedAndVariableNumInputs(10,20,f=3) function out=definedAndVariableNumInputs(X,Y,varargin) ...

4일 전 | 0

답변 있음
how to use varagin with parameter
Perhaps this is what you're looking for: opts=myfunc(f=3) opts=myfunc(b=5) opts=myfunc(f=3,b=5) function opts=myfunc(o...

4일 전 | 0

답변 있음
Plotting Anonymous Function of two variables
f1 = @(x) erf(x(1))+cos(x(2)); fsurf(@(x1,x2) f1([x1,x2]) , [-5 0 -5 5])

4일 전 | 0

| 수락됨

답변 있음
Problem 1899. Convert a Cell Array into an Array
x = {'01', '56'; '234', '789'}; y=[x{:}] x={'' 'a' '1'; 'AA' 'BB' 'CC'; 'dog' 'cat' 'car'}; y=[x{:}] x={'We' 'do' ;'ll ' ...

5일 전 | 0

| 수락됨

답변 있음
how can we find the coordinates of more points besides the points automatically generated by Contour in MATLAB?
You can interpolate the points uniformly with interparc: https://www.mathworks.com/matlabcentral/fileexchange/34874-interparc

5일 전 | 0

질문

How to doc() a command which is overloaded by multiple toolboxes
The evaluate() command has a version in both the the Curve Fitting Toolbox and in the Optimization Toolbox. How does one use doc...

5일 전 | 답변 수: 1 | 0

### 1

답변

답변 있음
How do I make this array index into a function of two other array indices?
Perhaps you meant to have this: for i=1:70 cx(i)=-L(i)/2*(cp(i+1)+cp(i))*sin(theta(i)); end

5일 전 | 0

답변 있음
Draw samples using a Non-Gaussian distribution
x = randn(100,1); x(randperm(numel(x),50))

5일 전 | 0

답변 있음
Error in plotting - indices not compatible
vpasolve is returning empty (because it found no solution), so you cannot assign it to soly3(1) >> vpasolve(subs(N1_subs_tsol3/...

6일 전 | 0

답변 있음
how does fmincon deal with ill-conditioned problem?
It depends how badly conditioned your objective is. Most fmincon algorithms are some variation of Newton's method, which helps a...

7일 전 | 0

답변 있음
transform the number cell so that only numbers (with or without decimals) excluding zeros are visible
You can round all of the numbers to 2 decimal places as below. This will make it so that any number that was an integer to 2 dec...

8일 전 | 0

답변 있음
transform the number cell so that only numbers (with or without decimals) excluding zeros are visible
If your're just looking for a way to change the display format, and not the numbers themselves, I think you can only do that in ...

9일 전 | 0

답변 있음
Solve many similar fmincon problems with a fully Vectorized Objective function and Analytical gradient + hessian
To vectorize, you must, (1) Sum the elements of f, not take its norm. (2) Vectorize your constraints and their gradien...

9일 전 | 0

답변 있음
Creating new field names within a new structure when trying to reshape data
Your post is hard to follow, so I'm doing a bit of guessing as to what you want. Regardless, I think the data organization strat...

9일 전 | 1

| 수락됨

답변 있음
Problem-based Optimization: Constarint sum(x==1) >=1 doesn't work.
I think it would be better to formulate it like this: A = [1 2 3; 0 3 0]; [rowA, colA] = size(A); k=zeros(3); k(...

9일 전 | 1

| 수락됨

답변 있음
Finding a specific value in Y-axis value with known X-axis value
Alt = [11000,12000,13000,14000,15000,16000,17000,18000]; % Altitude [m] Relative_density_ISA = [0.2971,0.2537,0.2167,0.1851,0.1...

9일 전 | 0

| 수락됨

답변 있음
How to apply calculation over multiple columns in a matrix
The code you've posted already does it, after transposition. x = linspace(0,100,length(presentMatrix)); y = 0:100; newMatrix=...

9일 전 | 2

| 수락됨

답변 있음
How to convert string to optimization variable?
I ended up using "eval" function to solve this issue, but I know "eval" is not recommended. If you have many optimvars, then pi...

9일 전 | 0

답변 있음
My vectors are not the same length
t=linspace(0,500,numel(L.actual_ver));

9일 전 | 1

답변 있음
Fitting to 4D data
Yes, you can use lsqcurvefit.

10일 전 | 0

| 수락됨

답변 있음
How do i plot this with different domain other than unit disk?
syms z a b X(z)=atan(z); Y(z)=z/(z^2 + 1); Z(z)=sym(1/2) - 1/(2*(z^2 + 1)); X(a,b)=subs(X,z,a+...

10일 전 | 0

| 수락됨

답변 있음
Correlation between matrices with different dimensions (spatial resolution)
You can use imresize3 to resampe the arrays at a common resolution.

10일 전 | 0

답변 있음
Using optimisation function "fminunc" for nth number of time
It is because the n that you pass to objectiveFcn(x,Y,freq,n) is being overwritten by n=3 inside your objective function code. ...

10일 전 | 0

답변 있음
Trying to index into a cell array using columns of a matrix
I am trying to use two columns in a matrix Call this matrix I. to index into a cell array. Call it C. Then you could do, a...

10일 전 | 0

| 수락됨

답변 있음
Draw a curve defining the bounds of a scatter plot to detect anomalous (sparse or low density) points
Sets=["xy1" "xy2" "xy3" "xy4"]; Factors=[20,20,5,5]; for i=1:numel(Sets) xy=load(Sets(i)).(Sets(i)); ...

10일 전 | 0

| 수락됨

답변 있음
Pass existing object to different class objects
It will be a "pointer", until you make a change to one of the shared copies. Then, the specific property variables that you chan...

11일 전 | 0

| 수락됨