Community Profile

photo

Matt J


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

Statistics

All
  • Editor's Pick
  • Personal Best Downloads Level 4
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • Master
  • Revival Level 4
  • 36 Month Streak
  • Thankful Level 4
  • Knowledgeable Level 4
  • First Answer

View badges

Content Feed

View by

Answered
How to covert a 1D vector to 2D matrix with overlapping effectively?
X=randi(30, 1,14); segment_size = 4; overlap_rate = 0.5; d=segment_size*overlap_rate; idx=(1:segment_size)'+ ( 0:d:(num...

6 hours ago | 0

Answered
Plot elements of specific size
You could probably use a listener to increase the MarkerSize etc as a response to zooming in or out. The code below is an imple...

9 hours ago | 0

Answered
Plot elements of specific size
First, I don't care about interactive zooming. I'd like to save a pdf. If the zooming is happening only after the pdf conversio...

12 hours ago | 0

Answered
how to write a function which converts graphs from linear scale to logarithmic scale and plot them both?
To convert the scale of an existing graph from linear to log, you can do, set(gca,'YScale','log') set(gca,'XScale','log')

13 hours ago | 0

| accepted

Answered
Cropping the same roipoly for multiple images
I don't understand what you mean by "cropping" an image to a non-rectangular region. An image, cropped or otherwise, is an inher...

14 hours ago | 0

Answered
Calculating value of function in point
f=@(x)2*x+2.^x; test = evaluate(f,0,6,7) function matrix = evaluate(f,x,y,n) a = linspace(x,y,n); b = f(a); matrix = [a;b...

15 hours ago | 0

Answered
Failure in initial objective function evaluation. FSOLVE cannot continue.
Is there supposed to be a '+' after teta1s? fval(2,1)=beta1c+teta1s+((2.66*mumr...

15 hours ago | 0

| accepted

Answered
How to write a function with logical condition which takes an array and turns back an array?
K=sinc(alpha/pi*(x-y.'));

15 hours ago | 1

| accepted

Answered
2D matrix multiply with 3D array
[m,n,p]=size(B); Br=reshape(B,[],p); Br=Br(:,1:200); %might not be necessary U1=Br*u; V1=Br*v; c=reshape( sum(U1.*V...

20 hours ago | 0

| accepted

Answered
using eig to find the eigenvalues and eigenvectors of a large matrix on GPU
It might be a question of your hardware. On the GTX 1050 in R2020b, I see only about a 10% speed-up in double precision and abou...

21 hours ago | 0

Answered
A function does not work with an array as an input argument
args={'ArrayValued',1}; MyFun = @(a, x) ( integral(@(k) k .* (1 ./ ( 1 + (a*k - x).^2 )), -1, 1,args{:}) ./ ... integral(@(k...

1 day ago | 1

| accepted

Answered
Rounding errors when using quadprog
There's nothing wrong with post-rounding, however setting lb(i)=ub(i)=0 for the appropriate variables should force them to an ex...

1 day ago | 0

Answered
Connect the optimizer function to data extracted from another software
You've written a fitness function f=@(~) e_and_r_vals(md_e,E_best_vals_from_md_r) which takes no input arguments. The fitness ...

2 days ago | 0

| accepted

Answered
Is there an alternative to eval in a struct?
Your data organization seems like it should be reconsidered. In a struct, it doesn't make sense if different fields have essenti...

2 days ago | 0

| accepted

Answered
Expressing polynomial including a indefinite parameter
Possibly you mean that you want a coefficient vector as the output, rather than a polynomial in functional form. syms a x P ...

3 days ago | 0

Answered
Expressing polynomial including a indefinite parameter
One way. p = @(x,a) polyval([a,-4,2-a],x); Usage: x=1; a=2; p(x,a)

3 days ago | 1

| accepted

Answered
Combining 3 2D graphs into a 3D figure
Something like the following, perhaps? x=linspace(0,5); z1=x.*exp(-x); z2=3*x.*exp(-4*x); Hax=axes; area(x,z1,'Parent',up...

3 days ago | 0

| accepted

Answered
How can I minimize absolue value in a power optimprob?
The objective is to minimize the integral of Pgrid abs value... while the control variables are Pbatt and Pev; Ppv and Pload If...

3 days ago | 0

| accepted

Answered
Finding out what initial guesses the curve fitting toolbox made for curve fit
I don't think there's anyway to dig out the initial guess generated inside fit(), but why not just specify your own random start...

3 days ago | 0

| accepted

Answered
I have two arrays that I want to divide a specific way
C=A./B;

3 days ago | 0

| accepted

Answered
When I export the figure, the x-axis is halved even though I have set the interval in the code.
I usually use export_fig(), https://github.com/altmany/export_fig

4 days ago | 0

Answered
How to fill a hollow donut-shaped object so that it looks like a circle?
load Image montage( {BW, imfill(BW,'holes')}, [],'Back','w','Bor',5)

4 days ago | 0

| accepted

Answered
Is there a way to set MaxSQPIter for active-set algorithm under fmincon?
Probably because you didn't pass options to fmincon. Otherwise, show us your code.

4 days ago | 1

Answered
histc problem in counting in particular bin
You are assuming that the bin boundaries are calculated with infinite precision, which is impossible. Likewise your data is also...

4 days ago | 0

| accepted

Answered
Replace value that are associated to a location by nan
spl(0<= elevation & elevation<=100)=nan;

4 days ago | 0

| accepted

Answered
Fit dataset to another dataset
See polyfit(). https://www.mathworks.com/help/matlab/ref/polyfit.html

4 days ago | 0

Answered
optimization of matrices with random initialization
Make sure your objective function code does not contain any randomization steps. Your initial guess can be random, but the objec...

4 days ago | 0

| accepted

Answered
HOW TO REVERSE THE BINARY IMAGES
outt33(:,:,i) = ~imbinarize( I)

4 days ago | 0

| accepted

Answered
How do I obtain FFT of nabla operator F(▽)?
4*fft2(del2(Image))

4 days ago | 0

Answered
What dose this function mean and what is the differentes ?
The first is calculating the number of zeros in B and the second is summing all values in B (times -1).

4 days ago | 0

Load more