Azzera filtri
Azzera filtri

Converting excel column into matlab

3 visualizzazioni (ultimi 30 giorni)
Atilla Sarentica
Atilla Sarentica il 11 Ago 2017
Risposto: KL il 11 Ago 2017
Hi,
I'm doing a Database in matlab where I put alot of information regarding specific Components that a Company uses in various units. I'm listing different stuff such as the material of the Component, the Surface treatment (if any) and how well the Component is resistant to different fluids & fungus.
I've been doing the Database as a function that we can call ''list''. Within this function there are if-loops where each if-loop represents each Component and is searched through its article number. So lets say that an if loop is of Component ''XXXX'' and contains information regarding this Component. To search for the Component in the database, you enter list('XXXX') into the command window and it spits out all the information from the if-loop.
This can be done for various Components at once by entering list('XXXX','XXX1','XXX2','XXX3') as an example and so on..
So finally to my question. If I have an excel file with various Components represented through their article numbers in a column, is there a way to convert it into matlab?
For example: The column in excel consists of Components XXXX, YYYY and ZZZZ. Is there a way to convert it into matlab in such way that I can search for them as list('XXXX','YYYY','ZZZZ') in the command window?
Would be very helpful especially because some excel-files consists hundreds of Components. Not ideal if I have to manually write them.
Any help is appriciated! :)
  1 Commento
José-Luis
José-Luis il 11 Ago 2017
Without understanding the particulars of your application, I still feel compelled to say that using Matlab as a database strikes me as a bad idea™.
If the size of your application grows, if you want sane backup practices, and many other things, then you should use an actual database.
And if you need to communicate with said database, then Matlab can do that.

Accedi per commentare.

Risposte (2)

KL
KL il 11 Ago 2017
Another way is to use tables.

KSSV
KSSV il 11 Ago 2017
doc xlsread . With this you can import your excel data into MATLAB and do what you want.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by