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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 1

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 1

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 2

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 0

Respondida
How to convert ?
abs(E)^2

más de 9 años hace | 0

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

más de 9 años hace | 1

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 0

Respondida
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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

Cargar más