Huge data manipulation in Matlab

In summary, the speaker has 5000 matrices in Excel that they need to transfer to Matlab. They want to manipulate the names of the matrices and use them in operations inside loops. They can do this by using the 'eval' command, which allows them to assign and operate on variable names defined in terms of other variables.
  • #1
Physics_wiz
228
0
I have about 5000 matrices which are all in excel. I need to put them all in Matlab so I can use them in programs. Every one of the 5000 matrices will be in its own excel sheet and they will all be saved in a folder. I don't mind reading them one by one in Matlab, but the thing I am having trouble with is manipulating the names of the matrices. For example, I want the first matrix to be called A1, the second to be called A2, third A3, etc... After all those are in Matlab, I want to do operations such as Ax(:,2)+A(x+1)(:,5) inside loops.

My main question is, can I somehow make a vector of just the names (i.e. names = [A1 A2 A3...A5000] and then use those in loops? Say I want to add every matrix to the one 5 steps after it like, B1 = A1+A6, B2 = A2+A7, etc... how can I use matrix names inside a loop?
 
Last edited:
Physics news on Phys.org
  • #2
It sounds to me like you want to use the 'eval' command. It allows you to assign things to and operate on variables names which are defined in terms of other variables.

For example, if I want to create 5 matrices which are called A1, A2, ..., A5, and have each matrix An be such that An = n*eye(n), I would write

Code:
for n = 1:5
eval(['M' num2str(n) ' = n*eye(n)' ])
end
 
  • #3
Ahh I see. Thank you so much :smile:.
 

Related to Huge data manipulation in Matlab

1. What is "huge data" in the context of Matlab?

"Huge data" refers to a large amount of data that exceeds the memory capacity of the computer. In Matlab, this is typically data that is too large to be stored in a single array or matrix.

2. How can I manipulate huge data in Matlab?

There are several ways to manipulate huge data in Matlab, including using functions such as "memmapfile" and "matfile" to access and modify data on the hard drive without loading it into memory. Additionally, you can use parallel computing techniques to distribute the data across multiple processors.

3. What are the challenges of manipulating huge data in Matlab?

The main challenges of manipulating huge data in Matlab are managing memory limitations, optimizing performance, and dealing with data that is too large to visualize or analyze using traditional methods. This requires careful planning and efficient algorithms.

4. Can I use Matlab for real-time manipulation of huge data?

Yes, Matlab can be used for real-time manipulation of huge data. However, it is important to carefully manage memory and optimize performance to ensure that the data can be processed in real-time without delays or errors.

5. Are there any tips for efficiently manipulating huge data in Matlab?

Some tips for efficiently manipulating huge data in Matlab include using built-in functions specifically designed for handling large datasets, preallocating memory, and parallelizing operations using the Parallel Computing Toolbox. It is also important to optimize code and minimize unnecessary operations to improve performance.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
18
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
Replies
7
Views
991
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
Back
Top