Réponse apportée
Summing numerical data of excel files in Matlab
Assuming file names to be coded as follows: |data_001.xlsx, data_002.xlsx, .., data_100.xlsx|, you could build a solution based ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Time serie import from csv
I'd personally read data directly from the XLS file.. [num,txt] = xlsread( 'Nam_rain_2005-2011_6.xls' ) ; dates = ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to right-justify columns in txt file using fprintf
There shouldn't be a white space in the _formatSpec_ string between the |%| and the format specifier. Observe the difference on ...

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
Need some help with equation error, please.
As the error message says, you are using variable |ya| in function |MAE340_P1| on line 14: Hs = c10*exp((-F*ya(2)/R*T)); ...

plus de 12 ans il y a | 0

Réponse apportée
find same dates in two cell array
At this point I don't know how your dates are coded, but here is a simple illustration. Assume that dates are 28, 29, 30, and da...

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
Grouping imported data and exporting into a .txt file
Ok, the code that you provided in your comment is a good start. Here is a hint: define >> x = [9, 3, 6, 7, 1, 2] ; Then, ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
how to remove unique values.
Assuming that elements of |A| are integers greater or equal to 1, you could do something like: >> nonUniqueValues = find( ac...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
[DISCONTINUED] MATLAB Answers Wish-list #2 (and bug reports)
I think that it would be better to have the forum adding automatically a target attribute target="_blank" to links prese...

plus de 12 ans il y a | 1

Réponse apportée
Read a textfile in MATLAB
Could you copy/paste e.g. 20 lines of a typical file? If these lines that you are looking for are spread in a bunch of other typ...

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
Extract data from URL Human Mortality Database
MATLAB doesn't support well authentication. If you have 2013a, you can try <http://www.mathworks.com/support/solutions/en/data/1...

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
How to eliminate texts from the data file?
If the first line |"This measurement contains x,y and time"| is not present (if you added it for us to understand), you can do s...

plus de 12 ans il y a | 5

| A accepté

Réponse apportée
How to read a text or a .c file without comments into a cell array ?
What about a simple.. buffer = fileread( 'function.c' ) ; buffer = regexprep( buffer, '/\*.*?\*/', '' ) ; buffer = r...

plus de 12 ans il y a | 1

Réponse apportée
instruction version of colon operator (:)
The way I am managing this is to use RESHAPE, which doesn't realloc or build temp array(s) as far as I could see. So what you do...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
how to get distict values from many text files (please help)
The following approach is based on regular expressions: files = {'data_01.txt', 'data_02.txt'} ; nFiles = numel(files) ; ...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Huge problem when I import data from Yahoo
You are right about the cause. Do you really need to have ticker codes used as field names? Why not using a more basic cell arra...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Textscan reading file and surrounding text with single quotes
>> fileContent = 'ABCD 8 10.2' ; % Fake content for the ex. >> columns = textscan(fileContent, '%s %d %f...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
How to create a specific matrix from a regular matrix
Here is a one-liner. Assume >> A = randi(20, 3, 4) % Example. A = 19 16 2 16 6 8 ...

plus de 12 ans il y a | 1

Réponse apportée
Extracting certain data from very large text/numeric data
Based on your comment: one way to tackle that is to split the file according to section headers/footer, so you get blocks that y...

plus de 12 ans il y a | 0

Réponse apportée
append the content of a txt to the end of a txt....
You can read/write line by line with something like while ~feof(fid1) line = fgetl(fid1) ; fprintf(fid, '%s\r\n', ...

plus de 12 ans il y a | 3

| A accepté

Réponse apportée
append data to the end of a txt file...works for 1 line...it doesnt work for two lines
fprintf(fid,'alength\r\n blength\r\n') ;

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
how do i vectorise given code?
You should provide a numeric example, e.g. with a 4x4 array |A|, and show us a few steps of what you want to achieve. In your qu...

plus de 12 ans il y a | 1

Réponse apportée
Six cities in matlab with Dijkstra's Algorithm
Just use the FEX submission by Joseph Kirk that I used in this answer: <http://www.mathworks.com/matlabcentral/answers/82034-how...

plus de 12 ans il y a | 0

Réponse apportée
Textscan and file paths work on my MacBook, but not on Windows 7
For building the full path, use FULLFILE. In FOPEN, specify the permission explicitly, so you don't have to count on compatibili...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Use Textscan or sscanf?
Assuming that lines starting with a |'*'| are some sort of block footers, here is one way to extract data blocks: fid = fop...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Creating a monthly average from a matrix
Just avgAllYears = mean(KoppenA_prate, 3) ; where |3| is the dimension along which the mean must be computed. With that y...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Extracting and formatting data from a txt like file
You can do something like: fid = fopen('myFile.hoc', 'r') ; content = textscan(fid, 'pt3dadd(%f,%f,%f,%f,%f)') ; fclose(...

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
whats the syntax of i++ in matlab
No, not even |i+=1|. We see proposals going in that direction in various which-lists, but nothing was implemented so far. What w...

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
The "Did you mean..." routine
*See EDIT 2 and 3 below for a better version of the initial answer.* Here is another idea, just for the fun of it: classN...

plus de 12 ans il y a | 2

Réponse apportée
Code to search for a word in a file taking too long to execute.
Have you tried using regular expressions? For counting occurrence in file |A| of words from file |B|, you would do something lik...

plus de 12 ans il y a | 0

Réponse apportée
How do I find the last occurrence of a match using regexp in MATLAB?
Is it what you want? If so, we can work a bit to improve it (in particular for allowing stars in the comment if relevant, which ...

plus de 12 ans il y a | 2

Charger plus