Home > other >  How matlab in Excel output specified element location lines of data
How matlab in Excel output specified element location lines of data

Time:10-05


For example I want all from the output of the figure 'mt' how can I get the same data, I tried some methods, such as the find function gets only location, lost data,
There is a problem, because of the import data, there are Numbers and strings, bad operation,
In asking bosses operation
I have here I try some:
Close all;
Clear all;
CLC
[num, TXT, raw]=xlsread (' F: \ Shared cycling data \ GXDC CSV ');
% import dataSTR=strrep (TXT, 'mt', '1'); % to mt 1 to replace
Str1=strrep (STR, 'ofo:', '2'); % will ofo: 2 to replace
Str2=strrep (str1, 'MB', '3'); % to MB 3 to replace
Str3=strrep (str2, 'hellobike', '4'); % will hellobike 4 to replace
Str4=strrep (str3, 'qibei', '5')
[row1, col1]=find (STRCMP (str4, '1')) % compare strings str4 and 1, if fully equal to the return 1, not equal to return 0
.

CodePudding user response:

Top erected a

CodePudding user response:

The find function can return data, [] c, v, r=the find (), r to sort by column of the data returned
  • Related