Community Profile # Matt J

Last seen: Today 2009 以来アクティブ

Professional Interests: medical image processing, optimization algorithms

#### Statistics

All
• • • • • • • • • • • バッジを表示

#### Content Feed

How can I perform large sparse matrix multiplication efficiently when one sparse matrix is block diagonal?
Here's what I see in a simple test comparing ndSparse.sum() and ndSparse.summl() >> A=ndSparse.sprand([1e4,1e4,10],0.1); >> ...

26分 前 | 0

Commenting Code inside for loop. Orientation Issue
No, but enhancement requests for this have been submitted (by me at least).

1日 前 | 0

Custom class properties and method attributes
I don't know why it's not documented, but apparently there is a Description attribute that can be added, e.g., classdef myclass...

1日 前 | 1

| 採用済み

How do I get the indexes of a symmetrical logical matrix without getting repetitions of those indexes?
[I,J]=find(yourMatrix); keep=(J>=I); I=I(keep); J=J(keep);

1日 前 | 0

| 採用済み

calling seperate members of a vector function
There's no way to do that. You could do it if the components are held in struct form, e .g., F=@(x,y) struct('a',x-y,'b', y^2);...

2日 前 | 0

Matlab does not find new method in class folder without "clear classes"
I don't know if it's intended or not, but my experience is that it only happens when your class is in a @-directory. If you put ...

3日 前 | 1

Finding consecutive zeros in an array. Not able to solve using diff command
Using, https://www.mathworks.com/matlabcentral/fileexchange/78008-tools-for-processing-consecutive-repetitions-in-vectors [~,~...

3日 前 | 0

Solve equation with multiple values for V
Because there is no analytical solution. Try vpasolve() or fzero() instead.

3日 前 | 0

Help. Plot graph calculation
You mean, how to plot the triangle? You can do, x=linspace(0,3,1000); y=(1-abs(x-1)); y=y.*(y>=0); plot(x,y)

3日 前 | 0

Intensity Profile of a specific line
You could just use improfile() https://www.mathworks.com/help/images/ref/improfile.html

3日 前 | 0

Multiple plots on the same graph
I think the line where you plot is supposed to look like, semilogx(tc,PDF); but the code you've posted contains no variable c...

3日 前 | 0

| 採用済み

How to create a custom Matrix following a set of parameters
n=5; A=-diff(eye(n+2),2,1); A(:,1)=[]

3日 前 | 0

How to create a custom Matrix following a set of parameters
n=5; c=[2,-1,zeros(1,n-2)]; r=[c,0]; A=toeplitz(c,r)

3日 前 | 0

| 採用済み

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...

4日 前 | 0

| 採用済み

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...

4日 前 | 1

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...

4日 前 | 0

| 採用済み

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')

4日 前 | 0

| 採用済み

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...

4日 前 | 0

| 採用済み

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...

4日 前 | 0

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...

4日 前 | 0

| 採用済み

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

4日 前 | 1

| 採用済み

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...

4日 前 | 0

| 採用済み

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...

4日 前 | 0

| 採用済み

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...

5日 前 | 1

| 採用済み

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

5日 前 | 0

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 ...

5日 前 | 0

| 採用済み

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...

6日 前 | 0

| 採用済み

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 ...

6日 前 | 0