Réponse apportée
Reading in data with spaces
Here is a quick fix following a different path from what is mentioned in Dpb's thread. Assume that we have |test.txt| with the f...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
An efficient way of finding sequential points near zero
What you want to achieve is not completely clear to me. Does that help? t = 0 : 0.1 : 20 ; x = sin( t ) + rand( size( t ))...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Transfer lines in a text file to a new text file
You can do something along this line: content1 = fileread( 'm21rmmorphU.txt' ) ; content2_rows = strsplit( fileread( 'vir...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
grouping data by value
x = [1, 8, 2, 3, 3, 7] ; % Dummy example. [~, binId] = histc( x, [0, 4, 10] ) ; % Bin edges: 0 --bin1-- 4 ...

plus de 10 ans il y a | 2

| A accepté

Réponse apportée
Large Cell Array Manipulation?
The loop is probably not the limiting factor. RANGESEARCH will be much slower than the loop, for almost any number of atoms. Try...

plus de 10 ans il y a | 0

Réponse apportée
How can I separate hand from forearm after skin segmentation?
This could be a start. This is not as solid/stable as what ImageAnalyst proposes though. In French we would call that "bricolage...

plus de 10 ans il y a | 3

Réponse apportée
How do I send a file .txt or .evt between two computers using TCP/IP
I'd say "by email". More seriously, if you need to build a client-server system, look at the following: <http://www.mathworks...

plus de 10 ans il y a | 0

Réponse apportée
How can I speed up importing large .d files?
I would do something along the following line: buffer = fileread( 'test.txt' ) ; data = sscanf( buffer(76:end), '%f' ) ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How Can I recognize/detect the Needle/hand in the below images?
ImageAnalyst will certainly provide a fancy solution (like a |bwGetBlobAngle| from his FEX ;-)), but (waiting for him to hit the...

plus de 10 ans il y a | 4

| A accepté

Réponse apportée
Shift rows by different amounts
N = 4 ; A = repmat( 1:N^2, N^2, 1 ) ; % Dummy example. for k = 2 : N A(k:N:N^2,:) = circshift( A(k:N:N^2,:), (k-1) ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Loading Large CSV files
If the file contains numbers that you want to get in a numeric array of doubles in MATLAB ultimately, the array will be around 2...

plus de 10 ans il y a | 4

Réponse apportée
Need to remove '~' in column 5 of text file
*UPDATE 5:04pm* % - Read original. content = fileread( 'mwithin21rm.txt' ) ; % - Match and eliminate lines without pat...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
I'm trying to make a contour map but I keep running into a small issue. Does anyone know what I have to do to either my function file or script file?
Your function doesn't define it's output argument |V|, but another variable |VS|. You should change the double FOR loop for a...

plus de 10 ans il y a | 0

Réponse apportée
Repeated string what been increment by 1?
The approach is questionable, but let's say that technically you can do this: for k = 6 : 10 baseName = sprintf( 'A_%d'...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
How can I import .xlsx files automatically without having many programming concepts?
Look at the following: doc uiputfile doc fullfile doc xlswrite The first will allow you to open a file selection wind...

plus de 10 ans il y a | 0

Réponse apportée
nansum for double or single -> why error?
Are you using a version of MATLAB anterior to 2006a? Evaluate |ver| or |version| to check. Or maybe you shadowed the function by...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Remove the NaN elements in a matrix
A(any(isnan(A),2),:) = [] ; To understand, evaluate isnan( A ) any( isnan( A ), 2 ) class( any( isnan( A ), 2 )) ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Reading a matrix (or array) from an excel file
Hi, try something along the following line: [filename, filepath] = uigetfile( '*.xls*' ) ; N_C = xlsread( fullfile( filepa...

plus de 10 ans il y a | 0

Réponse apportée
How to use spell checker with matlab?
You could try this: <http://www.mathworks.com/matlabcentral/answers/91885-is-there-any-way-to-check-spelling-from-within-matl...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
vectorial programming instead of for-loops
The first thing to consider is that given the size of matrices that you are dealing with (and the fact that elements are of type...

plus de 10 ans il y a | 0

Réponse apportée
How to determine which indices in a row cell array contains the value 1, even when there are null vectors [ ] in the cell array?
find( cellfun( @(x) ~isempty(x) && x==1, C )) ans = 5 6 7 8 9 10

plus de 10 ans il y a | 0

Réponse apportée
Counting unique values across the columns of a matrix
*UPDATED* as developed in the comment below y = find( arrayfun( @(c) numel( unique( A(:, c) )), 1:size( A, 2 )) > 3 ) ; ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Can I display two sprintf variables side by side?
I would have the functions output numbers and no strings (which contain line returns), and then build a print function which is ...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
Count word frequency, please help
What do you mean by "it didn't work"? Did you get an error message? If so, please copy/paste it. If the output was not correct, ...

plus de 10 ans il y a | 5

| A accepté

Réponse apportée
How to load in variable if it is present in a matfile?
An alternate solution is to <http://undocumentedmatlab.com/blog/trapping-warnings-efficiently/ catch the warning> (LOAD doesn't ...

plus de 10 ans il y a | 1

Réponse apportée
Help with this code - logical indexing and num2cell -
The line that you mention defines a vector |equ| of logical elements which are true (1) where the condition is true (relational ...

plus de 10 ans il y a | 2

Réponse apportée
Use a numeric array as Map value
If I understand well what you are trying to achieve, you can: * Build your own system using a cell array of keys and STRCMP...

plus de 10 ans il y a | 4

Réponse apportée
Choosing data from an array using a binary array
_(Formerly a comment)_ What do you want the points that are not flagged by your logical array to be replaced with? *Example:*...

plus de 10 ans il y a | 0

Question


Managing {} indexing in SUBSREF/SUBSASGN overloads.
Dear all, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I am starting a thread for discussing an issue that arises when one wants to ma...

presque 11 ans il y a | 1 réponse | 3

1

réponse

Réponse apportée
Undefined function or variable in ode45
You cannot have all these lines of code in the same file. You must have two M-files, one named |fun.m| which contains functi...

environ 11 ans il y a | 0

| A accepté

Charger plus