Community Profile

Contact

Top 1% contributor

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

4 Answers

3

Asked 25 days ago

104 downloads

1 month 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...

accepted

5

Answered 2 months ago

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

7466 views

Responded 5 months ago

82 downloads

24 days ago

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

4

Answered 1 month ago

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

Answered 5 months ago

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

Answered 8 days 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 19 days ago

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

You gave this code in a comment to my other answer: size(f)==[1,350] size(r)==[50,50,900] for ii=1:350 for ...

2

You did not state in your question how you are runing this code, so I assumed that it is in a script. You can store the output o...

You could use my FEX submission |natsortfiles|: http://www.mathworks.com/matlabcentral/fileexchange/47434-natural-order-filen...

To get the digits in a scalar numeric: >> x = 1.23456789; >> N = 4; >> n = fix(rem(x,1)*10^N) n = 2345 then to ...

MATLAB's feature called <http://www.mathworks.com/help/matlab/matlab_prog/vectorization.html vectorization> would be a great hel...

Use <http://www.mathworks.com/help/matlab/ref/quiver.html |quiver|> to plot vector arrows on a 2D plot, or <http://www.mathworks...

1

Answered 15 hours ago

There is indeed a *very easy* and *very fast* solution: *better data management and planning*. Just because something is poss...

Answered 1 day ago

I did something very similar to this in a FEX submssion: http://de.mathworks.com/matlabcentral/fileexchange/43700-cubehelix-c...

Answered 4 days ago

It is very unusual to store data in a callable Mfile script. In MATLAB, like most programming languages, data and the executable...

Answered 5 days ago

This is a very complicated topic, because it depends what you mean by "similar" words, how close they have to be to count as mat...

Answered 7 days ago

There are a couple of issues here # You need to use <http://www.mathworks.com/help/matlab/ref/size.html |size|> , not <http:/...

Use MATLAB's rather powerful <http://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html indexing> abi...

Answered 10 days ago

matrix(idx,1)

Answered 11 days ago

The reason you cannot find any "unit" for the image is because there are none. Raster images are just collections of pixels, so ...

Answered 12 days ago

You can use <http://www.mathworks.com/help/matlab/ref/blkdiag.html |blkdiag|> for this: >> A = [1 2 3; 2 3 4]; >> B = nu...

Actually |1.0000000e+003| *is* 1000. These are just different ways of writing *the same number*, so you really don't need to ...

Answered 14 days ago

You will have to do this in a loop, something a bit like this: for k = 1:numel(connames) condir = fullfile(dirs.root...

This will insert a space character between each character of any string: str = 'my cat kathy'; str(2,:) = ' '; str = ...

<http://www.mathworks.com/help/matlab/ref/factorial.html Factorial> exists: factorial(N) But for the others use some bas...

Answered 17 days ago

Note that |A=[100;011,101]| generates an error in MATLAB due to inconsistent dimensions. Perhaps you meant |[100;011;101]|? It i...

Load more