Community Profile

Suspensa Vix Via Fit

Contact

Top 1% contributor

I reject the label "expert", but here is my two cents worth anyway: * MATLAB has one great feature that very few programming ...

accepted

5

Answered 20 days ago

In <http://de.mathworks.com/matlabcentral/answers/175074#comment_264181 a comment> to my own comment (advising the OP to not use...

4 Answers

4

Asked 7 months ago

132 downloads

8 months ago

Unless you have good reasons to use cell arrays, then the simplest answer is to store your data in *one* numeric array and use t...

Answered 8 months ago

There are several natural order sort functions available on MATLAB File Exchange, but these all naively treat filenames as a sim...

9485 views

Responded 11 months ago

Ugh... really bad idea! Avoid creating dynamically named variables in MATLAB. This is poor practice as has been explained man...

Answered 13 days ago

Ugh... bad idea! Avoid creating dynamically named variables in MATLAB. This is poor practice as has been explained many times...

Answered 1 month ago

Basically you should not do this. Using dynamically defined variable names or encoding data within the variable name is a pretty...

Try this: '1010' - '0' or equivalently: '1010' - 48

Answered 11 months ago

Thank you for editing your question and making it clearer. You can use <http://www.mathworks.com/help/matlab/ref/regexp.html ...

3

Answered 2 months ago

You can simply wrap the |strfind| inside |isempty|, like this: >> ~isempty(strfind('Schroedingers cat is alive!','cat')) ...

Answered 3 months ago

* Instead of concatenating file-paths together, you should use <http://www.mathworks.com/help/matlab/ref/fullfile.html |fullfile...

Answered 4 months ago

>> N = 6; >> pow2(floor(log2(N))) ans = 4 And it is even fully <http://www.mathworks.com/help/matlab/matlab_p...

Use <http://www.mathworks.com/help/matlab/ref/bsxfun.html |bsxfun|> for this: >> A = [1, 3; 4, 2] A = 1 3 ...

Both Geoff Hayes and Grieg have made some good points about simplifying the |if| statements, but it seems no one has addressed t...

Answered 6 months ago

If the |127x4| matrix is named |A|, then use mean(A) If you want to be more precise about which dimension it calculates ...

Answered 7 months ago

If you are talking about creating files with sequential filenames, these might be helpful to read: http://www.mathworks.com/m...

64 downloads

7 months ago

The documentation for <http://www.mathworks.com/help/matlab/ref/specialcharacters.html |[]|> clearly describes it as being a _co...

2

_"Is there any way to do it?"_ Of course, in principal any data with a known specification can be parsed by MATLAB. Is the...

The fastest that I could come up with is to avoid |accumarray| and stick with loops only... about ten times faster on my compute...

A search of MATLAB Answers for "Yosemite" brings up 179 hits: http://www.mathworks.com/matlabcentral/answers/?term=Yosemite&t...

*Intersection*: simply use <http://www.mathworks.com/help/matlab/ref/intersect.html |intersect|> with the |stable| option: ...

There is no need to use slow |find|, when <http://blogs.mathworks.com/steve/2008/01/28/logical-indexing/ logical indexing> is fa...

Here is a solution using no loops, and only <http://www.mathworks.com/help/matlab/matlab_prog/vectorization.html vectorized code...

It is likely that the data are <http://www.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html floating point> and...

This requires just *one* small change to the solution to <http://www.mathworks.com/matlabcentral/answers/195663-txt-file-to-matl...

That syntax is not MATLAB syntax at all: MATLAB <http://www.mathworks.com/help/matlab/ref/if.html |if|> does not use a |then| st...

Answered 5 months ago

It is not clear exactly what your question is: are you having difficulty reading this data from the file, or converting the text...

Use a <http://www.mathworks.com/help/matlab/cell-arrays.html cell array> like this: out = cell(1,max_trials); for trial ...

Load more