Answered

How to read images with positive integer? No imead()

I definitely don't get all zeros with imread. Problem solved? >> nnz(imread('C0039_100122_INDS.png')) ans = 4624 ...

How to read images with positive integer? No imead()

I definitely don't get all zeros with imread. Problem solved? >> nnz(imread('C0039_100122_INDS.png')) ans = 4624 ...

9 months ago | 0

| accepted

Answered

FFT, IFFT and phase shifting

Is this what you want Xf=fftshift(fft(y)); f=fs.*((0:N-1) -ceil((N-1)/2))/N; subplot(2,1,2) stem(f,abs(Xf)/length(y)); ti...

FFT, IFFT and phase shifting

Is this what you want Xf=fftshift(fft(y)); f=fs.*((0:N-1) -ceil((N-1)/2))/N; subplot(2,1,2) stem(f,abs(Xf)/length(y)); ti...

9 months ago | 0

| accepted

Answered

Branching points problem in binary image

[I,J]= find( bwmorph(BW,'branchpoints') );

Branching points problem in binary image

[I,J]= find( bwmorph(BW,'branchpoints') );

9 months ago | 0

| accepted

Answered

How do I replace missing data with other values?

isnan is the correct way to detect and replace nans. Rn=radi; Rn(isnan(radi))= ---- something else ----

How do I replace missing data with other values?

isnan is the correct way to detect and replace nans. Rn=radi; Rn(isnan(radi))= ---- something else ----

9 months ago | 0

| accepted

Answered

How can I register or rotate series of image in matlab

imregister or imregtform seems like a good choice.

How can I register or rotate series of image in matlab

imregister or imregtform seems like a good choice.

9 months ago | 0

| accepted

Answered

parallel computation for a for loop

parfor pi=1:NP*kkk Tempo1 = zeros( p(pi) ,1 ); Tempo1_M = zeros( p(pi) ,1); Tempo2 = zeros(q(pi) ...

parallel computation for a for loop

parfor pi=1:NP*kkk Tempo1 = zeros( p(pi) ,1 ); Tempo1_M = zeros( p(pi) ,1); Tempo2 = zeros(q(pi) ...

9 months ago | 0

| accepted

Answered

Error using trainNetwork. Unable to read file.

I think it is expecting more traditional types of image files like .jpg,.png, etc.. I think for .mat you need to specify a speci...

Error using trainNetwork. Unable to read file.

I think it is expecting more traditional types of image files like .jpg,.png, etc.. I think for .mat you need to specify a speci...

10 months ago | 0

| accepted

Answered

How to use a for-loop to find the onset (first element) of trials of zeros, ones and twos, in an array of sequences of zeros, ones and twos

No, we're not going to do your homework for you. Go away and leave us alone.

How to use a for-loop to find the onset (first element) of trials of zeros, ones and twos, in an array of sequences of zeros, ones and twos

No, we're not going to do your homework for you. Go away and leave us alone.

10 months ago | 0

Answered

Rotation of the circle (points)

Just add an increment to the th th = linspace(0,2*pi,10) + rotation_angle ;

Rotation of the circle (points)

Just add an increment to the th th = linspace(0,2*pi,10) + rotation_angle ;

10 months ago | 0

| accepted

Answered

FFT Peak at Zero

Apply fftshift to your spectrum to see it with DC centered in the plot. x=csvread('230.csv',1,0); rollSpectrum=ffts...

FFT Peak at Zero

Apply fftshift to your spectrum to see it with DC centered in the plot. x=csvread('230.csv',1,0); rollSpectrum=ffts...

10 months ago | 2

Answered

Solving compound linear optimization problem

I've never heard of a compound optimization problem but maybe this will help https://www.mathworks.com/discovery/multiobjective...

Solving compound linear optimization problem

I've never heard of a compound optimization problem but maybe this will help https://www.mathworks.com/discovery/multiobjective...

10 months ago | 1

Question

Is this a bug in lsqcurvefit?

When I run this simple test of lsqcurvefit (this is R2018a), I get errors. opts=optimoptions(@lsqcurvefit,'SpecifyObjective...

10 months ago | 0 answers | 1

Answered

invalid syntax at '=' . A '(' might be missing a closing ')'

if (f == 0) and same thing in this line if(~isinteger(NMAX) || NMAX == 0 || ischar(NMAX))

invalid syntax at '=' . A '(' might be missing a closing ')'

if (f == 0) and same thing in this line if(~isinteger(NMAX) || NMAX == 0 || ischar(NMAX))

10 months ago | 0

| accepted

Answered

How to save vectors with different lengths

One way is to use cell arrays C={1,[2,3],[4,5,6,7]}

How to save vectors with different lengths

One way is to use cell arrays C={1,[2,3],[4,5,6,7]}

10 months ago | 0

Answered

fitting 2 variable function to (x-1) form

My fit is completey messed up, and it looks nothing like the data. It shouldn't look like the r and eta data, because that's no...

fitting 2 variable function to (x-1) form

My fit is completey messed up, and it looks nothing like the data. It shouldn't look like the r and eta data, because that's no...

10 months ago | 1

| accepted

Answered

Image registration of two different imaging moralities

That sounds like a very unusual registration problem, but if you have a model that relates the CT image to the microscopy image,...

Image registration of two different imaging moralities

That sounds like a very unusual registration problem, but if you have a model that relates the CT image to the microscopy image,...

10 months ago | 0

Answered

How to preprocess this image.?

PI=I; PI(~CH_objects)=255; imshow(PI); title('Preprocessed Image');

How to preprocess this image.?

PI=I; PI(~CH_objects)=255; imshow(PI); title('Preprocessed Image');

10 months ago | 0

| accepted

Answered

how to extract the first three elements present in each row of a matrix

B=A(:,1:3)

how to extract the first three elements present in each row of a matrix

B=A(:,1:3)

10 months ago | 0

| accepted

Answered

max min optimization using inbuilt MATLAB function fminimax

The outside negative sign only matters if you care about calculating the optimal fval [x,fval] = fminimax(------) fval=-fval; ...

max min optimization using inbuilt MATLAB function fminimax

The outside negative sign only matters if you care about calculating the optimal fval [x,fval] = fminimax(------) fval=-fval; ...

10 months ago | 1

Answered

Unable to perform assignment because the left and right sides have a different number of elements.

k(i) = (4/pi) * (1/(2*i+1)) * sin( ((2*i+1)* pi.* t(i))/T );

Unable to perform assignment because the left and right sides have a different number of elements.

k(i) = (4/pi) * (1/(2*i+1)) * sin( ((2*i+1)* pi.* t(i))/T );

10 months ago | 1

| accepted

Answered

Fit multiple sets of data with same function model to get optimal global parameter using lsqcurvefit

This might be what you mean - ExtraData.R=R; ExtraData.G=G; ExtraData.pks_locs1=pks_locs1; ExtraData.pks_locs2=pks_...

Fit multiple sets of data with same function model to get optimal global parameter using lsqcurvefit

This might be what you mean - ExtraData.R=R; ExtraData.G=G; ExtraData.pks_locs1=pks_locs1; ExtraData.pks_locs2=pks_...

10 months ago | 0

| accepted

Answered

Not Enough Input Arguments in fsolve

function myProblem options = optimset('display','off') x = fsolve(@fun,[2 3.5],options) X = x(1) Y = x(2) fun...

Not Enough Input Arguments in fsolve

function myProblem options = optimset('display','off') x = fsolve(@fun,[2 3.5],options) X = x(1) Y = x(2) fun...

10 months ago | 0

| accepted

Answered

My textbook gave me code that has an error I don't know how to fix

alt and flag must be scalars.

My textbook gave me code that has an error I don't know how to fix

alt and flag must be scalars.

10 months ago | 0

| accepted

Answered

Reducing a vector size when it is being updated in a loop

for h=5:-1:1 %code to load all script files if h==1 A = dlmread("Trial 1"); elseif h==2...

Reducing a vector size when it is being updated in a loop

for h=5:-1:1 %code to load all script files if h==1 A = dlmread("Trial 1"); elseif h==2...

10 months ago | 1

| accepted

Answered

How can I go back to the beginning of my program first line by a command?

keepGoing=true; while keepGoing answer=input('Do you wish to continue [yes/no]','s'); keepGoing=(answer=...

How can I go back to the beginning of my program first line by a command?

keepGoing=true; while keepGoing answer=input('Do you wish to continue [yes/no]','s'); keepGoing=(answer=...

10 months ago | 0

Answered

Classdef get methods: allowing get indexing into an array of length either (1x1) or (Nx1).

You would need to overload subsref, e.g., methods function out=subsref(obj,S) if S(1).type=="." && S(1).subs{1}=="A" &&...

Classdef get methods: allowing get indexing into an array of length either (1x1) or (Nx1).

You would need to overload subsref, e.g., methods function out=subsref(obj,S) if S(1).type=="." && S(1).subs{1}=="A" &&...

10 months ago | 0

| accepted