フィルターのクリア

Reading text from an excel file and populating a matrix with those values.

1 回表示 (過去 30 日間)
Jay
Jay 2014 年 9 月 29 日
回答済み: Jay 2014 年 9 月 30 日
I have read "http://www.mathworks.com.au/matlabcentral/answers/146754-xlsread-not-reading-text-only-excel-file" trying to figure out how to populate a matrix with those values.
So, so far I have:
[num,txt]=xlsread(filename,sheet_4)% Reads the numbers and text
network_station_coordinates = xlsread(filename,sheet_4,(num,txt))% populates the matrix with the prior
% matrix
This does not work.
Can someone please tell me what I need to do in-order to populate the num,txt values into the network_station_coordinates matrix?
Thanks.

採用された回答

Iain
Iain 2014 年 9 月 29 日
[numbers_only text_only both] = xlsread(filename,sheet_4);
Then one of:
network_station_coordinates = numbers_only; % if you just want numbers
network_station_coordinates = text_only; % if you just want the text
network_station_coordinates = both; % if you want both.

その他の回答 (1 件)

Jay
Jay 2014 年 9 月 30 日
Thankyou, that works perfectly.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by