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...
Asked 25 days ago
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...
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...
5 months ago
24 days ago
Basically you should not do this. Using dynamically defined variable names or encoding data within the variable name is a pretty...
Answered 1 month ago
'1010' - '0'
'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
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:
You gave this code in a comment to my other answer:
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|:
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...
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:
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
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:
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...
Join the conversation