Answered
iteration chaotique
Run this function with start value for X in the interval (0,1). function cssm() X=0.5325; K=100; % X...

14 years ago | 0

| accepted

Answered
input to structures
See: <http://www.mathworks.se/help/techdoc/creating_guis/f3-1001115.html>

14 years ago | 0

| accepted

Solved


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

14 years ago

Answered
ismember for many datasets
This is a question for Cody :-) Please check whether this one-liner does the job. I don't think there is the single function ...

14 years ago | 0

Answered
one case can not be initiatated when plotting using switch-case
!!! floating point arithmetic suffers from rounding errors !!! See: <http://www.mathworks.se/help/matlab/matlab_prog/floatin...

14 years ago | 0

| accepted

Answered
csvread text column
Doc says: ... csvread ... The file can only contain numeric values. Try: textscan

14 years ago | 0

Answered
Index for loop
Try ix = find( list == x );

14 years ago | 0

Solved


Remove NaNs and numbers adjacent to NaNs
The aim is to remove the elements before and after NaN occurrences inside a vector. For example: x = [6 10 5 8 9 NaN 23 1...

14 years ago

Solved


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

14 years ago

Answered
quick search in two vectors
strfind is a bit faster than find with whole numbers (floating integers, flints). The difference used to be larger. With R2012a ...

14 years ago | 1

Answered
Order cell array
Try the FEX contribution <http://www.mathworks.se/matlabcentral/fileexchange/10959-sortnat-natural-order-sort sort_nat: Natural ...

14 years ago | 0

Solved


Convert a structure into a string
Convert the contents of each fields into a string. Example with an input structure s with 2 fields : s.age = '33' s....

14 years ago

Solved


Sort an array of structures
You need to sort an array of structures based upon *a numeric first field*: For example : a.n=1; a.name='a'; b.n=3...

14 years ago

Answered
Dissecting someone elses Matlab code
Are you posing this question to experts of robot arm kinematics? Do you have a problem using the tools of Matlab? Did you a...

14 years ago | 0

Answered
Why does how I reference data in a cell array change in a for loop?
Do you step through the code with the debugger? If you want us to try the code you must supply the data needed to run it. ...

14 years ago | 0

Answered
Function input
Try string_input_by_user = input( ..... string_input_by_user = 'sin'; foo = str2func( ['@(x)', string_in...

14 years ago | 1

Answered
make single element be array,,
This used to be called Tonys trick: w1 = w1( ones( 1, 5 ) ); this is more standard w1 = repmat( w1, 1, 5 ); ...

14 years ago | 1

| accepted

Answered
scatterm marker size - cannot change marker size for scatterm points on map (2012a)
I don't use scatterm. However, I have the toolbox installed and tried the example in the documentation. I noticed # scatterm ...

14 years ago | 0

| accepted

Answered
Matlab slows down when writing to large file
*Writing to a HDF5 file is one possibility* With the attached function, huge2hdf, I have created one 21.6GB hdf5-file. Each ...

14 years ago | 2

Answered
Limit to Textscan?
Does the data block of the file have a format something like this? time_stamp, value space time_stamp, value space time...

14 years ago | 0

Answered
Summing values with database "group by" functionality
Here is a solution that doesn't require the Statistical toolbox. Separators: # list separator: space # thousand sepa...

14 years ago | 0

Answered
[DISCONTINUED] Wish-list for MATLAB Answer sections.
Now I learned the hard way how to loose the text I'm writing in Answer. The recipe is as follows: # write text # include li...

14 years ago | 1

Answered
Reading From Different Directories in a for loop (fopen from different directories)
There is a function in the FEX, <http://www.mathworks.se/matlabcentral/fileexchange/32226-recursive-directory-listing-enhance...

14 years ago | 1

| accepted

Question


'ABC'-'A' Considered Harmful
The trick *'ABC'-'A'* is that good programming style? --- edit --- *"tag: goto"* alludes to <http://en.wikipedia.org/wiki...

14 years ago | 5 answers | 3

5

answers

Answered
extract numbers from a char type input
Try doc strtok and doc str2num

14 years ago | 0

| accepted

Answered
consider preallocating for speed
Try replacing IMGDB = cell(3,[ ]); by IMGDB = cell(3,nface); or something or set s = warning( 'off'...

14 years ago | 0

Answered
Function Browser
That's the way it's designed - floating on top.

14 years ago | 0

Answered
Fltering to subsets of matrices
Yes! sum( MyData( strcmp( MyData( :, ixColumn ), 'GA' ), : ), 1 ) This question is very close to <http://www.mathw...

14 years ago | 0

Answered
Summing values with database "group by" functionality
In the Statistical toolbox there is a class named Dataset. It has a method grpstats. grpstats Class: dataset S...

14 years ago | 0

Answered
Explore an hdf5 file
Did you search the Matlab documentation? Yes there is! Try info = h5info( filespec ); See <http://www.mathworks.se/hel...

14 years ago | 0

Load more