Plz explain the operation

[~, ~, raw] = xlsread('C:\Users\KARTHIK P K\Desktop\kpk.xls','MT1_PMUtest_RealTimePass','E3:AQ1014');
raw(cellfun(@(x) ~isempty(x) && isnumeric(x) && isnan(x),raw)) = {''};
Explain the operation of the above statements plz

 採用された回答

Cedric
Cedric 2013 年 4 月 10 日

0 投票

CELLFUN is called with two arguments: an anonymous function, and a cell array. It applies the anonymous function to each element of the cell array, and outputs an array of the same size as the cell array, whose elements are the function output. The function that you are using takes one argument, locally named x, and returns a logical AND operation (with shortcut) between all test functions that are listed: not ISEMPTY, ISNUMERIC, and ISNAN.
The output of CELLFUN is therefore an array of logicals, that is used to index the cell array raw. Elements of raw targeted by this operation are replaced with a cell that contains an empty string.

1 件のコメント

karthik
karthik 2013 年 4 月 10 日
thanks for the reply . . . sir, i need other help . . plz answer this question : - http://www.mathworks.in/matlabcentral/answers/69214-2-different-y-axis-plot-using-timeseries

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

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 4 月 9 日

0 投票

Read a cell raw from an Excel file then replace all numeric values, nan and empty element by ' '

カテゴリ

ヘルプ センター および File ExchangeStructures についてさらに検索

質問済み:

2013 年 4 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by