Réponse apportée
How do I get regexp to read specific values in a text file?
I assumed that you forgot the |Platform| field in the first line of your sample data and took the following instead: Platfor...

presque 13 ans il y a | 2

Réponse apportée
Summing nonsequential elements in a matrix
|magic(50)| is a square, 50x50 matrix. What do you want to achieve? Is it summing elements [5 7 19 33 34 35 36 47 50] of row 1 o...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
how to find overlapping intervals?
If boundaries are integer, a solution can built based on CUMSUM for building interval IDs and DIFF or UNIQUE for finding boundar...

presque 13 ans il y a | 1

Réponse apportée
Changing property attributes in a value class
I don't think that this _"hide and reveal"_ approach is sound/wise. You can implement whatever logic in your methods so they wor...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
matrix from arrays of different size
I don't understand where 0 NAN 1 0 2 1 3 2 4 3 is coming from, but why do you need to have results in a single array? If ...

presque 13 ans il y a | 0

Réponse apportée
Is MATLAB is automatically concatenating data from a text file?
What are you trying to achieve, extract the numbers? The space in the pattern |' +'| won't match tabs actually, but |'\s+'| woul...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Incorporating Structure Fields into a Function as Inputs
I am not sure that I understand what you are trying to do .. so you have a class e.g. |Transline|, which contains a method |crea...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
Quickest way to convert numeric array to a cell array of strings
Ok, to be honest, my issue at this point is that this approach is not that common, and I can't figure out whether you are an exp...

presque 13 ans il y a | 0

Réponse apportée
How can I extract arrays from a structure?
There is no such thing as |vals(i).data|. If you wanted to save only the 7 relevant columns, you could update a little your c...

presque 13 ans il y a | 0

Réponse apportée
regriding an irregular matrix
A general approach could be the following, assuming that you have this matrix |A| with datenums in the first row. [y, m] = d...

presque 13 ans il y a | 0

Réponse apportée
CSV: Create New Headerline
Assuming that there is no comma but tabs ( |\t| ) as delimiters, I give you one way to do it: % - Read input file data conte...

presque 13 ans il y a | 2

| A accepté

Réponse apportée
Is there way to suppress the timer?
Just use a |;| at the end of the line with the |toc|: >> tic ; pause(1) ; t = toc ; Here there is no output for example, ...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Matrix: Find corresponding elements in a different column
Ok, I understand; do you need columns to be separate? If not, you could go for the following solution: assume the whole dataset ...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
Applying regexpi to csv file
So it is true that your CSV has not comma as delimiter? The general approach is to use TEXTREAD, TEXTSCAN, FSCAN, etc when yo...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
is there a more efficient way to omit certain characters from a string without using loops?
One way would be newsf = regexprep(sf, '([CREP1-4]|SQ)', '') ; but what does "etc" encompass?

presque 13 ans il y a | 1

| A accepté

Réponse apportée
Convert Cell to String
You could use something like: s = sprintf('%s\n', x{:})

presque 13 ans il y a | 1

| A accepté

Réponse apportée
Problem Importing Data from a CSV file
You can also use TEXTREAD, as follows: [t, p] = textread('myFile.csv', '%s %f', 'delimiter', ' ', 'headerlines', 1) ;

presque 13 ans il y a | 0

Réponse apportée
Reading in a file name with a zero
You probably want to do something like this: for imgId = first : last fileLocator = fullfile(source, sprintf('IMG_%04d...

presque 13 ans il y a | 1

Réponse apportée
want to calculate the sum of the numbers appear in an array that is mix of NaNs and numbers
It is not trivial actually. Look at the following and let me know if there is anything unclear. Also, I let you check that it ma...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
how to call a specific variable in matrix inside loop process..??
Here is an answer based on what I understood, and a truncated version of |xdata| in which I removed the last row that contains a...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
String Match for Plotting in Excel
If states had no space in their names, or if you had commas as delimiters in the CSV file, you could go for a variant of [s...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
How to calculate conditional sum of a part of vector/array based on a 2nd one
The following is an example of "vector approach": dif = [true, diff(B)~=0] ; blockId = cumsum(dif) ; blockSt...

presque 13 ans il y a | 2

Réponse apportée
Why is regexp including extra data?
*EDIT:* if all words that you want to extract *are known a priori*, Per gave you the answer. Your pattern is too generic; it ...

presque 13 ans il y a | 1

Réponse apportée
What does each line do?
If we execute the following in our command window (you'll have random numbers different from mine, and I work with 10 of them in...

presque 13 ans il y a | 1

Réponse apportée
Problem with Forward Euler function?
You should build a simple case study outside of this function. It seems that you want to build an array whose rows contain the e...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
How to search the continuous values with maximal size in a vector ?
You can go for a solution around the following: boundary = find([true, abs(diff(a))~=1, true]) ; [blockSize, boundaryStart...

presque 13 ans il y a | 2

| A accepté

Réponse apportée
Please help me with a while loop problem
The first thing that is not correct is the condition in the WHILE statement; you want to repeat the loop while the amount is bel...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
Static class call via string variable
Yes, you can proceed the same way as with dynamic field names: myObject = myClass() ; methodName = 'foo' ; x = myObj...

presque 13 ans il y a | 1

Réponse apportée
How to convert an nXn matrix into n/numXn/num matrix containing the sum of elelments
There is no function, up to my knowledge, that does this automatically (as you can see <http://www.mathworks.com/matlabcentral/a...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
Assign cell elements from a cell array to another cell array
Curly brackets mean "content of" (and generate a comma-separated list when you use them with a range); they don't perform block ...

presque 13 ans il y a | 5

| A accepté

Charger plus