필터 지우기
필터 지우기

how to open an array?

조회 수: 2 (최근 30일)
Dezdi
Dezdi 2018년 12월 4일
답변: KSSV 2018년 12월 5일
How could I open a cell array? There is 1X3 structs array
plot type which has 3 ansers
and properties has 3 field too
I need to write a function with two input vector which will plot it with all 3 plot type with their properties.
  댓글 수: 1
James Tursa
James Tursa 2018년 12월 4일
Please post the entire assignment, and what you have doe so far. Then ask specific questions about the problems you are having with your code and we can help you.

댓글을 달려면 로그인하십시오.

답변 (1개)

KSSV
KSSV 2018년 12월 5일
S = struct ;
for i = 1:3
S(i).answer = rand(1,3) ;
S(i).field = 1:3 ;
end
% plot
A = cell2mat({S.answer}')' ;
F = cell2mat({S.field}')' ;
plot(F,A)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by