How to create a structure which accepts 2 integer arrays?

I want to create one structure named peer which accepts integer array of records 1)value 2)Age?
So, how can I declare the structure? How can I accept an input for n entries?
FYI my code
i=1
n= no of nodes
while (i<=n)
valprompt = 'Enter the value of Node?';
peer(i).value=input(valprompt);
ageprompt = 'Enter the age of Node?';
peer(i).age=input(ageprompt);
end

 채택된 답변

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Time Series Events에 대해 자세히 알아보기

태그

질문:

2015년 9월 7일

답변:

2015년 9월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by