Converting excel column into matlab
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
José-Luis
2017-8-11
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.
回答(2 个)
KSSV
2017-8-11
doc xlsread . With this you can import your excel data into MATLAB and do what you want.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!