read and search an excel file with Arabic or Persian column

조회 수: 2 (최근 30일)
Nooshin Mahmoodi
Nooshin Mahmoodi 2018년 10월 19일
댓글: Nooshin Mahmoodi 2018년 10월 19일
I have an excel file with Arabic or Persian column, I want to search in this Persian column and find the repeated word in this column. But because it is Persian word, the Matlab read them as "NAN". is there anyone that know, how could I solve this problem? thanks in advance
  댓글 수: 3
madhan ravi
madhan ravi 2018년 10월 19일
This is an interesting question waiting for someone to answer
Nooshin Mahmoodi
Nooshin Mahmoodi 2018년 10월 19일
this file has three sheets with the Persian column and the first row is the name of variables in each sheet, for example, I need to search in the 4th column, that in the first sheet, just have seven different values, then I want to get average for the similar one.

댓글을 달려면 로그인하십시오.

채택된 답변

Guillaume
Guillaume 2018년 10월 19일
With R2018b, It looks like your spreadsheet can be read correctly using either xlsread or readtable.
[~, ~, raw] = xlsread('test.xls')
or
t = readtable('test.xls')
Some rows of the table don't display properly in the command window but are displayed properly in the variable browser. In addition, since matlab does not accept arabic characters for variable names, all the column names are mangled. But otherwise, everything appears to work properly
>> find(strcmp(t.(15), 'بتونی و فلزی')) %find 'بتونی و فلزی' in column 15
ans =
15
18
>> mean(t.(14)) %mean of column 14
ans =
5.375
  댓글 수: 1
Nooshin Mahmoodi
Nooshin Mahmoodi 2018년 10월 19일
thanks a lot, I used the "xlsread", but with the "readtable" it workes.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by