Réponse apportée
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...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Shade the area between two graphs
<http://www.mathworks.com/matlabcentral/fileexchange/13188-shade-area-between-two-curves>

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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.

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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))...

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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......

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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: ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
select first standard answer equal or greater than obtained answer
I(find(I>=H, 1, 'first'))

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 1

| A accepté

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

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How to count a number of edges counting from canny?
You can use bwlabel.

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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(...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
determine location of numbers within a vector
ind = arrayfun(@(val) find(val == x), 20:22)

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 1

Réponse apportée
How to fit two equations to one dataset
data(data < -10) = [];

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
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')...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 1

Réponse apportée
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...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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) %...

plus de 10 ans il y a | 2

Charger plus