フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Accessing the indicies of an element of matrix in cell array

2 ビュー (過去 30 日間)
surendra kumar Aralapura mariyappa
surendra kumar Aralapura mariyappa 2019 年 7 月 2 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hey all,
Hope this time i will get a solution to my problem at least.
A = {[22,40,46],['Node22';'Node40';'Node46'] };
s = 40
% may be conversion need here to get only row and col. P = cell2mat(A{1});
%nA = numel(A);
n = 50;
Match = cell(1, n);
for i = 1:n
[row,col] = find(P == s,1);
%match{iA} = [row,col];
end
Here How can I access the row and col, for an example I need to get row and col separately or together when the number is 40
i.e P(1,2)
I think it is possible by converting cell2mat(A{1}). I just need to get the row and col elements of first matrix in a cell array. for an example A = [1 2 3 5], we can get the idex of 5 is A(1,4). But I am not an expert to figure it out how it is?
I don't know whether it is weird question or not!
Thanks in advance

回答 (0 件)

この質問は閉じられています。

製品


リリース

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by