Community Profile

Contact

Top 1% contributor

130 downloads

27 days 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 1 month ago

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

7199 views

Responded 4 months ago

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

4

Answered 4 months ago

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

Answered 11 days ago

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

Answered 14 days ago

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

49 downloads

2 days ago

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

Answered 25 days ago

45 downloads

1 month ago

This code works with your original data file (which I uploaded here too). It parses most of the file into a <http://www.mathwork...

1

Answered 1 day ago

MATLAB high-level data reading functions (eg <http://www.mathworks.com/help/matlab/ref/textscan.html textscan>, <http://www.math...

3

Answered 7 days ago

There are multiple issues with your code: * Using equivalence logical tests on floating point values. It is important to real...

Answered 9 days ago

You code is almost right, just the function |floating| is not known to MATLAB. It doesn't exist, unless you have written it your...

Answered 10 days ago

Based on the text file that you uploaded, I altered my first answer to read *all* of the columns in your data: fid = fopen...

Answered 12 days ago

Use <http://www.mathworks.com/help/matlab/ref/rand.html |rand|> and <http://www.mathworks.com/help/matlab/ref/cumsum.html |cumsu...

Answered 13 days ago

The |0| refers to the "root", from where all graphics properties are inherited when a figure is created. By changing the values ...

Try this: >> A = reshape(1:6*4,6,4); % define a fake data array of size 6x4 >> B = struct('data',reshape(num2cell(reshap...

Answered 21 days ago

In MATLAB you can hold _differently sized_ data in a <http://www.mathworks.com/help/matlab/ref/cell.html cell array> . The data ...

Answered 26 days ago

There are multiple issues with your code. Here are a few that I quickly picked out: * using |=| to test for equivalency, wher...

Answered 28 days ago

If you read the documentation for the <http://www.mathworks.com/help/matlab/ref/sort.html |sort|> function, you will find that t...

There is no need to waste time or space with loops or even copying the data from one matrix to another. Try this instead: A...

You wish to perform an <http://www.mathworks.com/help/matlab/ref/transpose.html array transpose> on the following line: b =...

Answered 2 months ago

I guess you don't mean scalar numerics, but rather numeric arrays of arbitrary size. I answered in a previous question of yours ...

It seems that you want to apply a function to multiple numeric arrays contained in several cell arrays. There are essentially tw...

This error message is telling you that the function <http://www.mathworks.com/help/matlab/ref/gt.html |gt|> (which you use the a...

Using the arrays that you specified in your most recent comment: a = randi(50,600,9); mx = randi(50,60,1); mn = randi...

Based on my comment above (that the cell arrays and loops are red-herrings), then this simplifies down to "how to replicate the ...

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

Load more