回答済み
Analyse and make pattern from csv file
You will have to define a little better what you want to extract when errors are logged, but here is an example using REGEXP: ...

約13年 前 | 0

回答済み
Multiplying matrices as cells - 4 dimensional with variable no. of matrices (code works now!)
As you have only a limited number of values for |f|, you should avoid using complicated 3D or 4D arrays (indexing them is not al...

約13年 前 | 0

| 採用済み

回答済み
Data Saving - Storage Efficiency
>> f_dbl = 1 ; >> f_log = true ; >> whos Name Size Bytes Class Attributes f_dbl 1x1 ...

約13年 前 | 0

解決済み


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

約13年 前

回答済み
More Efficient Assignment Operation - Sparse Matrix
See: <http://www.mathworks.com/matlabcentral/answers/69528-sparse-matrix-more-efficient-assignment-operation>

約13年 前 | 1

回答済み
Not sure what I'm doing wrong. FOR LOOP
Difficult to know without seeing your sequence, but imagine that the cell array |codons| contains 60 characters.. when t = 60, a...

約13年 前 | 0

回答済み
Sparse Matrix - More Efficient Assignment Operation
The structure of sparse matrices in memory makes this kind of indexing operations slower than building the sparse matrix directl...

約13年 前 | 2

回答済み
How many times does each number appear?
Hi Hamad, Well, how large is "extremely large"? Image Analyst might have given you the optimal solution already. As an altern...

約13年 前 | 2

回答済み
Form strings/numbers from matrix
If you want numbers: >> A = [1 2 0; 0 2 6; 9 8 0; 0 0 2] A = 1 2 0 0 2 6 9 8 0 ...

約13年 前 | 1

| 採用済み

回答済み
create n arrays in matlab
If you really want to build |n| separate arrays, you will have to store them in a cell array, unless you want to dynamically gen...

約13年 前 | 1

回答済み
Is there a clean way to find the number of elements in a vector that are "near" a specified constant?
Yes, you can proceed as follows: >> n = sum(abs(A-100) < 5) n = 8

約13年 前 | 0

| 採用済み

回答済み
how do i create a recursive function that gives the number of digits in an integer? i.e. does the same that length function does in MATLAB
As Wayne mentioned, recursivity in unnecessary, but if you had to implement a recursive function, you could have built something...

約13年 前 | 1

| 採用済み

回答済み
read a number after a specific string in a txt file
As it's a bit more elaborate than your previous question, it might be time to go for a regexp solution (even though you can alwa...

約13年 前 | 3

| 採用済み

回答済み
Faster Method for removing duplicates
>> node_u = unique(node, 'rows', 'stable') node_u = 0.1234 5.6789 3.4567 9.8765 4.5678 8.7654 shou...

約13年 前 | 1

| 採用済み

回答済み
compute the repetition of a string in a text file
Your best option for pattern matching is usually regular expressions (regexp). In this particular situation where the pattern...

約13年 前 | 0

| 採用済み

回答済み
Merging cell arrays with variable number of elements
x = {A, B{:}, C} ; In this expression, |B{:}| is a comma separated list (CSL); it is equivalent to listing |B|'s cells' cont...

約13年 前 | 0

| 採用済み

回答済み
colon operation (:) causes parfor to fail on cell array
It has a priori nothing to do with PARFOR; the expression involving the colon on the left hand side is a comma separated list (C...

約13年 前 | 1

回答済み
Deleting Zero Rows - Matlab Noob
B(B(:,1)==0,:) = [] ;

約13年 前 | 4

| 採用済み

回答済み
[DISCONTINUED] MATLAB Answers Wish-list #2 (and bug reports)
An optional *chat room* with a *main channel* and *thread-specific channels* or user defined channels would be awesome. The rati...

約13年 前 | 0

回答済み
Using TEXTSCAN to import an ASCII file with a header and blank lines between different data sets
An alternative could be to use REGEXP to get blocks of data, e.g. in a struct array, and then post-process the content. To illus...

約13年 前 | 2

| 採用済み

回答済み
Maximize similarity of vectors
I've never done anything like that, but you picked my curiosity so I gave it a quick try.. v1 = [1 1 2 1 2 3 3 1 1 2] ; v...

約13年 前 | 0

回答済み
Finding durations between 1's in a matrix
If you had the following matrix |I| for example: >> I = rand(10,5) > 0.6 I = 0 1 1 0 0 0 1...

約13年 前 | 0

解決済み


Convert a cell-array of values to MATLAB source code
The MATLAB interpreter loads your code and executes it using the Read-Evaluate-Print-Loop (see <http://en.wikipedia.org/wiki/REP...

約13年 前

回答済み
How to randomly shuffle cards?
Look at the doc for RANDPERM. You can use it to shuffle a set of 1 to N integers: >> randperm(12) ans = 5 8 ...

約13年 前 | 0

回答済み
How to avoid using a global variable in this case
I thought that you were talking about OOP with your initial question, but if not, it is not a good idea to overload common opera...

約13年 前 | 0

回答済み
What is not "a finite, nonsparse, real integer vector" but looks like one? Error using circshift>ParseInputs (line 71)
>> A = rand(4) > 0.5 A = 1 0 0 0 1 0 1 1 0 0 0 1 0 1 1 ...

約13年 前 | 0

回答済み
fgetl drops part of line
Could you copy/paste here the first 10-20 lines of one of these files? Have you tried to read the full file in one shot and then...

約13年 前 | 0

回答済み
Matlab function/code similar to excel vlookup?
Look at this example: >> x = [1, 4, 2, 5, 3, 7, 6] ; % Fake x and y. >> y = x + 10 ; >> for k = 1 : 7, y(x == k), ...

約13年 前 | 0

回答済み
Improve result of text file
If you evaluate class(R{3}) class(R{1:2}) you will realize that these are cells/arrays. You need to index one step furt...

約13年 前 | 0

回答済み
Analysis and Prediction of Optimal Array Size of Pre-allocation.
Depending the nature of your computation, you can get an "analytical estimate", e.g. " _memory usage grows like_ |n^2|" for a gi...

約13年 前 | 0

| 採用済み

さらに読み込む