回答済み
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...

約13年 前 | 2

回答済み
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...

約13年 前 | 0

| 採用済み

回答済み
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...

約13年 前 | 1

回答済み
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...

約13年 前 | 1

| 採用済み

回答済み
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 ...

約13年 前 | 0

回答済み
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...

約13年 前 | 0

| 採用済み

回答済み
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...

約13年 前 | 1

| 採用済み

回答済み
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...

約13年 前 | 0

回答済み
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...

約13年 前 | 0

回答済み
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...

約13年 前 | 0

回答済み
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...

約13年 前 | 2

| 採用済み

回答済み
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, ...

約13年 前 | 0

| 採用済み

回答済み
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 ...

約13年 前 | 1

| 採用済み

回答済み
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...

約13年 前 | 0

| 採用済み

回答済み
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?

約13年 前 | 1

| 採用済み

回答済み
Convert Cell to String
You could use something like: s = sprintf('%s\n', x{:})

約13年 前 | 1

| 採用済み

回答済み
Problem Importing Data from a CSV file
You can also use TEXTREAD, as follows: [t, p] = textread('myFile.csv', '%s %f', 'delimiter', ' ', 'headerlines', 1) ;

約13年 前 | 0

回答済み
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...

約13年 前 | 1

回答済み
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...

約13年 前 | 0

| 採用済み

回答済み
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...

約13年 前 | 0

| 採用済み

回答済み
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...

約13年 前 | 0

| 採用済み

回答済み
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...

約13年 前 | 2

回答済み
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 ...

約13年 前 | 1

回答済み
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...

約13年 前 | 1

回答済み
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...

約13年 前 | 1

| 採用済み

回答済み
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...

約13年 前 | 2

| 採用済み

回答済み
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...

約13年 前 | 1

| 採用済み

回答済み
Static class call via string variable
Yes, you can proceed the same way as with dynamic field names: myObject = myClass() ; methodName = 'foo' ; x = myObj...

約13年 前 | 1

回答済み
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...

約13年 前 | 1

| 採用済み

回答済み
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 ...

約13年 前 | 5

| 採用済み

さらに読み込む