Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Accessing the indicies of an element of matrix in cell array

2 visualizaciones (últimos 30 días)
surendra kumar Aralapura mariyappa
surendra kumar Aralapura mariyappa el 2 de Jul. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Productos


Versión

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by