フィルターのクリア

Converting Hashtables with Matlab?

10 ビュー (過去 30 日間)
Lee
Lee 2016 年 12 月 7 日
編集済み: Lee 2016 年 12 月 7 日
Hey everyone,
So, I have these files generated in a format called .c01 (By Cellomics). I downloaded a App Package from this website https://www.openmicroscopy.org/site/support/bio-formats5.2/developers/matlab-dev.html which converts the .c01 file into a cell structure. I think all the raw data is stored in the 'Hashtable' cell. So I've extracted that cell and get an Object - 1x1 Hashtable. I have zero experience with Java and i'm having a heck of a time figuring out how to convert this hash table into an array of raw data values. Is there anyone with any experience with this that can help?

採用された回答

David Barry
David Barry 2016 年 12 月 7 日
編集済み: David Barry 2016 年 12 月 7 日
Hopefully this example helps to explain. You can obviously skip over the creating bit as you already have a table and presumably you just want to get all of the values out of it.
% create example Java hashtable and add some key/value pairs
h = java.util.Hashtable;
h.put('Name', 'John');
h.put('Country', 'UK');
% retrieve the value for a specific key
h.get('Name');
% retrieve all key names
allKeys = arrayfun(@char, h.keySet.toArray, 'UniformOutput', false);
% retrieve all key values
allValues = cellfun(@(x) h.get(x), allKeys, 'UniformOutput', false);
  1 件のコメント
Lee
Lee 2016 年 12 月 7 日
編集済み: Lee 2016 年 12 月 7 日
Edit* Nevermind I think I got it from this! Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBioinformatics Toolbox についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by