フィルターのクリア

how can I define an excel woorksheet in Matlab that consider the location of cells with equal numeric value and change them into specific values that I want.

1 回表示 (過去 30 日間)
how can I define an excel worksheet in Matlab that consider the location of cells with equal numeric values and change them into specific values that I want. in other word I want : Region 1 = locations of all cells with numerical values of A Region 2 = locations of all cells with numeric value of B And so on. and then change each region to specific values that I want. and repeat it and each time changing region s first value to specific values, as many times that I want . each region has so many cells therefor I cant define them cell by cells in matlab.

採用された回答

dpb
dpb 2014 年 3 月 16 日
It's so trivial in Matlab; just import the array; make the changes and rewrite (assuming you must use Excel at all; why can't you just use Matlab?)
data=xlsread('yourfile.xls');
data(data==A)=newA;
data(data==B)=newB;
xlswrite('yourfile.xls',data)
You may have the problem depending on the values addressed in the FAQ--
  13 件のコメント
baran
baran 2014 年 3 月 18 日
thanks so much , if "A" has value , for example all cells with value 2 , that when excel link to matlab "2" go to functions and change to another value and 2 in my program is a number and it is not symbol, then is it still true ? and what do you mean " if firstflag ..." can you explain more ? thanks.
dpb
dpb 2014 年 3 月 18 日
I don't know about how you're doing the "Excel link to Matlab" specifically, but certainly you'll have to fix any issue of whether the value passed is the character representation (a string/character variable) or the value itself. That should be relatively simple to deal with.
The "firstflg" is a variable you set to know whether the index array needs to be updated or whether to use the previously computed one. It's a local variable to Matlab controlled by whoever is in charge of the overall process which you've yet to describe how this whole thing is structured.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by