Respondida
I am not getting the correct keyword?
For writing and reading to files in Matlab you need a so called file identifier, or fid, that is generated using fopen and the n...

más de 10 años hace | 0

| aceptada

Respondida
Shade the area between two graphs
<http://www.mathworks.com/matlabcentral/fileexchange/13188-shade-area-between-two-curves>

más de 10 años hace | 0

| aceptada

Respondida
Read binary with ascii header
Use fgets to read the first ASCII lines and then use fread (with appropriate arguments) for the remaining binary stuff.

más de 10 años hace | 0

Respondida
Vector of dates going back one rolling year
A = datevec(now); m = A(2) - [0:11]; y = repmat(A(1), 1, 12); Find month that are in the previous years and set month...

más de 10 años hace | 0

Respondida
If statement in cell array; skip row if it equals certain value
Subtract = RigidBodies(1).Marker4(1,:); for c = 1 : numel(RigidBodies) nmarkers = fieldnames(RigidBodies(c))...

más de 10 años hace | 0

Respondida
Search data in cell array from disk?
<http://de.mathworks.com/help/matlab/import_export/load-parts-of-variables-from-mat-files.html>

más de 10 años hace | 0

Respondida
Finding the averages for a unique value.
X = input; A = X(:,1); MC = arrayfun(@(i) mean(X(A == i, 2:end)), unique(A), 'UniformOutput', false); M = reshape(cel...

más de 10 años hace | 0

Respondida
How can I generalize it ?
A{1} = conv([1 -r(1)],[1 -r(2)]); for i = 3:numel(r) A{i-1} = conv(A{i-2},[1 -r(i)]); end

más de 10 años hace | 0

| aceptada

Respondida
column in matlab to excel?
Have a close look at your code. You set raw{r+1,cols+2}=s; before you determine the value of s in the following if s......

más de 10 años hace | 0

Respondida
how do i combine figures' y - values
How to extract data from a fig is described in <http://www.mathworks.com/matlabcentral/answers/100687-how-do-i-extract-data-from...

más de 10 años hace | 0

Respondida
Can someone help me understand how this loop works?
You can add fprintf('(i=%d, j=%d):', i, j) disp(A) pause after the if in the inner loop and see what happens: ...

más de 10 años hace | 0

| aceptada

Respondida
video processing( find white pixel in binary image)
Sample data: X = rand(5)>0.8; Check if any pixel is 1 if any(X(:)) % do something end

más de 10 años hace | 0

| aceptada

Respondida
select first standard answer equal or greater than obtained answer
I(find(I>=H, 1, 'first'))

más de 10 años hace | 0

| aceptada

Respondida
I need help please
You did not tell us what you want to do, so it is somewhat speculative to propose what you should do. If you want to plot a line...

más de 10 años hace | 0

Respondida
Replacing NaN with variable data
This works is you have at least N values in up, where N is the number of NaNs in u. u=[0;0;0;0;NaN;NaN;NaN;NaN;NaN;NaN;NaN;N...

más de 10 años hace | 1

| aceptada

Respondida
HOW TO PLOT AN ECONOMIC SERIES
X = xlsread('../../Downloads/mexico_data_1900_2005.xls'); plot(X(:,1), X(:,2:end))

más de 10 años hace | 0

| aceptada

Respondida
How to count a number of edges counting from canny?
You can use bwlabel.

más de 10 años hace | 1

| aceptada

Respondida
Help me understand this code
gx and gy mark edges in the image in x and y direction. g is an image of the edges. You have 5 distinct edges in g, the outer bo...

más de 10 años hace | 0

Respondida
how to calculate area integral using cumsum under a known matrix of peaks and it +-50ms surrounding
Your solution is wrong, because you use index(i) as the increment; you probably want ecg_from_database(index(i)-50:index(i...

más de 10 años hace | 0

Respondida
Compare values of array of matrix 5x5x106
If you want to compare every matrix with each other, you have 5565 pairs to compare: Npairs = nchoosek(1:106,2); N = size(...

más de 10 años hace | 1

| aceptada

Respondida
determine location of numbers within a vector
ind = arrayfun(@(val) find(val == x), 20:22)

más de 10 años hace | 0

Respondida
Adding binary matrices generated in while loop
Just add the masks. And use a for loop instead of a while: mask = zeros(size(rr)); for i = 1:numel(radii1) maska = mas...

más de 10 años hace | 1

Respondida
How to fit two equations to one dataset
data(data < -10) = [];

más de 10 años hace | 0

Respondida
license plate recognition- need to compare with data stored in .mat file
Load the .mat file. Suppose it contains a cell string of all valid licences, use if any(strcmp(valid_licences, current_licen...

más de 10 años hace | 1

| aceptada

Respondida
Files not being read correctly
The problem in your code is that you do not save anything for the composite file. Also the first save(newfilename,'PINC')...

más de 10 años hace | 1

| aceptada

Respondida
Help! Z must be a matrix, not a scalar or vector?
You can use surf only to display a 2D surface, but not for volume data. For volume data, have a look at <http://de.mathworks.com...

más de 10 años hace | 0

| aceptada

Respondida
How to re-produce an existing variable in the script without using it?
You can use dlmwrite the write A to a file, open the file in an editor and copy and paste the contents to your script and add th...

más de 10 años hace | 1

Respondida
how to find blocks of values within array where difference is less than X for a specific number of values without losing the last value?
The code computes the differences *between* positions such that the final position is dropped. Just add it, using y+1: allI...

más de 10 años hace | 0

| aceptada

Respondida
how to find blocks of values within array where difference is less than X for a specific number of values without losing the last value?
The code computes the differences *between* positions such that the final position is dropped. Just add it, using y+1: allI...

más de 10 años hace | 0

Respondida
using the int i as output name
This is a possible framework of how to process 30 files: for i = 1:30 input_filename = sprintf('%d.wav', i) %...

más de 10 años hace | 2

Cargar más