Beantwortet
I have a matrix 20X1. I want to read all the elements of c2 and put the condition as if element of c2 is greater that zero and less than 70 then display that element else return. how should I do?
for i = 1:numel(ca) if ca{i} > 0 & ca{i} < 70 % do this else % do that end end If you just wa...

fast 10 Jahre vor | 0

Beantwortet
How do I do multi animated lines in one axes?
Just create a second animatedline and use addpoints: numpoints = 100000; x = linspace(0,4*pi,numpoints); y =...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
How to do paired t test with mean and sd?
If you have the Statistics Toolbox, you can use ttest(A-B)

fast 10 Jahre vor | 0

Beantwortet
Wrong results with my GUI project
There is an error in your formula / function. I also get TEmodel(10) = 17462.89, w/o any GUI. What should TEmodel compute bas...

fast 10 Jahre vor | 0

Beantwortet
variable string in warning dialog b
value = 2; warning(['number ' num2str(value)])

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
Random but unique values in matrix
The trick is to get more rows then actually needed, like 2*pop_size. Then you'll get your y almost always in the first trial: ...

fast 10 Jahre vor | 1

Beantwortet
To draw the roc curve using FPR and TPR
plot(fpr, tpr) It's possible to get a straight line, e.g., if the operator has zero discrimination.

fast 10 Jahre vor | 0

Beantwortet
how can I store values generated from a nested loop into an arrray ?
The general scheme is to do define a vector of values t = linspace(tmin, tmax, Nvalues); and run a loop for i=1:nume...

fast 10 Jahre vor | 0

Beantwortet
how to find actual distance between points in a image??
You need a cross in x and y direction of known size in your image. Then you can convert form pixel units to real-world distance....

fast 10 Jahre vor | 0

Beantwortet
Roc curve for image segmentation
For a ROC curve you need a binary ground truth and a continuous-valued segmented images; this image is usually the output of an ...

fast 10 Jahre vor | 1

Beantwortet
How do I plot intensity of points on a scatter plot?
If the x and y values are not 100% identical, you have to set up a grid and count the number of points in each grid, using hist2...

fast 10 Jahre vor | 0

Beantwortet
How to find the amount of data generated/memory requirment for a program?
You can use memorywhos function memory_in_use = memorywhos %MONITOR_MEMORY_WHOS uses the WHOS command and evaluates in...

fast 10 Jahre vor | 0

Beantwortet
How to correlate signal
[r, p] = corrcoef([A(:) B(:) C(:)];

fast 10 Jahre vor | 0

Beantwortet
Legend Color does not match color of plots!?
h = dirfield(Diff_EQ_4, linspace(0, 20), linspace(0, 24)) % directional field plot using linspace for t, C intervals hold ...

fast 10 Jahre vor | 0

Beantwortet
How to open a second instance of MATLAB in Mac OS X?
Right click on the icon (in the dock) of the Matlab hat is already running, select: "Open Additional Instance of Matlab". (Matla...

fast 10 Jahre vor | 2

Beantwortet
Why does histogram data from hist3 have to be transposed?
1. 1. n1 = n'; --> why does the histogram have to be transposed? Because dat is defined as dat = [-y, x] but the grid ...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
How to from a list produce a list of all distinct difference of elements and find out it comes from efficiently?
X = bsxfun(@minus, j', j) x = 10; [i j] = ind2sub(size(X), find(X == x)); y = x*(prod(i) + prod(j))

fast 10 Jahre vor | 0

Beantwortet
HOW TO TAKE AVERAGE OF ROW AND COLUMN AT SOME POINT
A = [2 5 3 500 4 5; 3 4 2 2 3 5; 4 5 5 1 2 2]; [i, j] = ind2sub(size(A), find(A==500)); m1 = mean(A(i, ~ismember(1:size(...

fast 10 Jahre vor | 0

Beantwortet
problem croping matrix data
This is because lat has 1001 values. You have to modify lat to match the spacing in your original data. To generate 1000 valu...

fast 10 Jahre vor | 0

Beantwortet
How to convert ?
abs(E)^2

fast 10 Jahre vor | 0

Beantwortet
Please can you give me some regular expression help
c = regexp(file.name, 'D(\d+)', 'tokens')

fast 10 Jahre vor | 1

Beantwortet
How to simulate atom decay
N0 = 1e5; % initial number of atoms lambda1 = 0.0001; %decays/s lambda2 = 0.00005; dt = 100; % time step (in...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
Saving Iterations in the loop
Just move the L = []; before the first loop: L = []; for Ro_s = Ro

fast 10 Jahre vor | 0

Beantwortet
How to get back the original image?
I = rand(10); % sample data I2 = exp(1i*pi*I); I1 = real(log(I2)/pi/1i);

fast 10 Jahre vor | 0

Beantwortet
how to convert wind direction to degrees?
Set up a list of compass wind directions and corresponding angles in deg: D = {'N'; 'E'; 'S'; 'W'}; Ddeg = [0; 90; 180; 270...

fast 10 Jahre vor | 0

Beantwortet
How to average values in a structure
j = 1; for i= 1:10:60 snew(j).field = mean(cat(3, s(i:i+9).field), 3); j = j + 1; end

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
correlation matrix from pairwise correlations of matrices
Convert each matrix to a column vector of X, using (:), and then run corrcoef(X)

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
How to load very large tiff file ?
If you can figure out if there is an R, G, and B channel in the image, say at layer 1, 2 and 3, you can use these to show an RGB...

fast 10 Jahre vor | 0

Beantwortet
How to display a figure in a borderless fullscreen mode?
Check out Psychtoolbox 3; it's free. The following demos may also be helpful: <http://peterscarfe.com/ptbtutorials.html>

fast 10 Jahre vor | 0

Mehr laden