답변 있음
A problem while splitting a text input with regexp
>> fprintf('%d,', table) ; fprintf('\n') ; 115,97,109,109,121,32,121,111,32,121,111,13,10,121,111,121,111,32,119,105, 116,...

거의 13년 전 | 0

| 수락됨

답변 있음
data appending in text file
Instead of opening the file with _write_ permission using |'w'|, open it in with _append_ permission using |'a'|.

거의 13년 전 | 0

| 수락됨

답변 있음
Searching for values that a particular variable takes in a single text file
I would go for something like: buffer = fileread('data.txt') ; match = regexp(buffer, '(?<=AvgValue:\s*)[\d\.]+', 'match'...

거의 13년 전 | 1

답변 있음
Trouble using textread to ignore certain elements in a .csv file (new to matlab!)
You could go for buffer = fileread('BrainTEST.csv') ; data = textscan(buffer,'%d %s %s %s %d %d %d %d %d %d %s %d %d', ......

거의 13년 전 | 1

| 수락됨

답변 있음
represent a volume given two surfaces
*Saturday EDIT:* I took 5 minutes to build an example closer to your case; see the new section after my initial answer. *=== ...

거의 13년 전 | 3

| 수락됨

답변 있음
Ridiculously Simple Nearest Neighbor Search 3D
Look at PDIST, *PDIST2*, KNNSEARCH here: <http://www.mathworks.com/help/stats/nearest-neighbors.html> If you don't have the S...

거의 13년 전 | 0

답변 있음
Converting .txt file to .xls format with Matlab as the interface.
I am illustrating my comment above with the following example: Assume the text file contains 15:28:43#00348#048.1#053.3#...

거의 13년 전 | 3

| 수락됨

답변 있음
Download older versions of a file in File Exchange?
It is not good practice, but if you are stuck with no time to update function calls in 100's of m-files because of a small chang...

거의 13년 전 | 1

| 수락됨

답변 있음
Code formatting in the forum
*EDIT @ 4:30pm EST:* strfind |-&gt;| regexp with neg. look behind for avoind matching |nbsp;|. Here is a simple crawler. It i...

거의 13년 전 | 3

| 수락됨

답변 있음
Why won't \n give me a new line?
You will need |\r\n| for producing a carriage return and a new line. This is a well documented issue between UNIX-based and Wind...

거의 13년 전 | 10

답변 있음
Why can't I access the archived documentation for MATLAB?
Have you tried the following source? <http://www.mathworks.com/help/pdf_doc/allpdf.html>

거의 13년 전 | 1

답변 있음
how to add to txt file from certain point
One way would be the following: fid_in = fopen('inFile.txt', 'r') ; fid_out = fopen('outFile.txt', 'w') ; cnt = 0 ; w...

대략 13년 전 | 1

| 수락됨

답변 있음
looking for specific data in a text file
Something around the following solution would work well: n = 150 ; e22s = zeros(n,1) ; g23s = zeros(n,1) ; for k = 1 :...

대략 13년 전 | 0

| 수락됨

답변 있음
How to reduce an existing matrix
buffer = M(:,1:10:end) ; M_reduced = buffer(1:10:end,:) ;

대략 13년 전 | 0

답변 있음
How can I compute the mean, standard deviation, minimum, and maximum of a vector without using MATLAB's std function?
Say you have >> x = [4, 8, 7, 5] ; >> b = 6 ; If you wanted to subtract |b| to each element of |x|, you would do it wit...

대략 13년 전 | 2

| 수락됨

답변 있음
Comma separated data with text using dlmwrite
Try with the following instead of DLMWRITE. fid = fopen('try3.txt', 'w') ; % Opens file for writing....

대략 13년 전 | 0

| 수락됨

답변 있음
How can I specify different entires in a vector - partially using a function
If |IC| is a vector, all your expressions IC(x) = something with |x| a floating point number, are invalid. |IC(x)| addres...

대략 13년 전 | 0

| 수락됨

답변 있음
Displaying latitude and longitude on grid lines
If I understand well your question, I would manage to do it using AXESM labeling properties. Summary at the bottom of <http:/...

대략 13년 전 | 1

| 수락됨

답변 있음
repeat loop different sets of intructions
As you know the lower and upper boundaries for |t|, you could base your approach on a FOR loop. With both WHILE or FOR, you shou...

대략 13년 전 | 0

답변 있음
Correlation funciton to find eigenvalues
Why not using |CORR2|? If your 12 matrices were stored in a cell array |M|, you would do something like n = numel(M) ; C ...

대략 13년 전 | 0

답변 있음
Can arrayfun take multi-dimensional arrays as individual arguments?
The first thing that I would try to do is to update the function so it can take vectors/arrays. Then I agree with Sean, Andre...

대략 13년 전 | 4

답변 있음
Uploaded command window contents to somewhere online?
The two main options are, assuming that you have access to some scheduler (crontab, etc) on the machine that runs MATLAB.. *1...

대략 13년 전 | 0

| 수락됨

답변 있음
Turn the output of a script into a cell array?
If the question is not: _how to filter the cell array_ 720 Aero Drive, Buffalo, NY 14225, USA Buffalo, NY 14225, USA Che...

대략 13년 전 | 0

| 수락됨

답변 있음
Using fscanf when some elements are not floating point
One way to do it is to start with string replacement.. to illustrate, say that the data file contains 4 5 6 7 8 9 ...

대략 13년 전 | 1

| 수락됨

답변 있음
Get GPS location from coordinates?
There are several solutions, depending the amount of data that you have to process, the time that you are willing to spend on co...

대략 13년 전 | 2

| 수락됨

답변 있음
How to automatically import data out of blocks in ascii files?
Several solutions would be available. Here is one which uses some of the most basic tools for reading ASCII file content: fi...

대략 13년 전 | 1

| 수락됨

답변 있음
comment je peux créer une matrice triangulaire inférieure remplit par 1 de très grande dimension?
La taille d'une telle matrice "pleine/full" de type "double" est environ 8GB >> 8*32400^2/1e9 ans = 8.3981 soit pl...

대략 13년 전 | 1

답변 있음
summing up array element
Hi, use CUMSUM: >> p_csum = cumsum(p) p_csum = 3 9 11 16

대략 13년 전 | 2

답변 있음
Proper Formatting in the 'fprintf' function
Right justification is the default and you would have to use |'-'| to enforce left justification. The issue with your code is th...

대략 13년 전 | 5

| 수락됨

답변 있음
Error using fprintf for cells
|G_code{1,1}{:}| is a comma separated list (CSL), which is not - I guess - what you thought it was. It is not possible to tell y...

대략 13년 전 | 2

| 수락됨

더 보기