필터 지우기
필터 지우기

hello i want to create a table by using the value i obtained from a for loop, how can i get it

조회 수: 3 (최근 30일)
x=5
y=30
for z=[1 2 4 8]
a=x*y*z;
disp(a);
end
table
x y z
5 30 150
5 30 300
5 30 600
5 30 1200

채택된 답변

VBBV
VBBV 2021년 12월 26일
x=5
y=30
I = 1
for z=[1 2 4 8]
a(I)=x*y*z;
xx(I) = x;yy(I) = y;
I = I+1;
end
iwant = table(xx.',yy.',a.','VariableNames',{'x','y','z'})

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by