1
변수 이름 MetabMapString을 spectroscopy() 함수에 전달합니다. MetabMapString은 호출 할 필드의 이름입니다. 그러나 마치 Matlab이 필드 이름 MetabMapString이 없다는 것을 반환하기 때문에 MetabMapString이 필드의 이름임을 Thicking하는 것처럼 보입니다. 일부 코드가 포함되어 있습니다. 이 방법을 사용할 수 있습니까?Matlab의 구조체에서 필드 이름 불러 오기?
n = length(spect.(MetabMapString));
작동합니다 :
function spectroscopy(MetabMapString)
spect = importdata(spectLCMI);
n = length(spect.MetabMapString);
Row = spect.Row;
Col = spect.Col;
spectOrig = spect.MetabMapString;
...
end
여기가해야 오류
??? Reference to non-existent field 'MetabMapString'.
Error in ==> SpectDraw>spectroscopy at 1165
n = length(spect.MetabMapString);
'spectLCMI'란 무엇입니까? 변수? 구조체? –
데이터가있는 CSV 파일입니다. 각 필드에는 이름이 있고 그 이름과 연관된 일부 데이터가 있습니다. –