- We have no idea what ‘a’, ‘b’, ‘c’, and ‘f’ are or how you define them;
- You could replace your separate ‘R’ lines with: R(i,:) = [a b c f];
how to display the outputs
조회 수: 2 (최근 30일)
이전 댓글 표시
Dear All,
I have problem to display my outputs from this function when I call it from another file drawbox(5)
function [Matrix] = drawbox(n)
R=zeros(5,3);
for i=1:n
R(i,1)=a;
R(i,2)=b;
R(i,3)=c;
R(i,4)=f;
end
R;
sortedR= sortrows(R,4);
Matrix= sortedR(:,1:3);
end
I don't know what is the problem.
댓글 수: 3
Star Strider
2014년 10월 19일
It would give the same result, just more efficiently.
- We still have no idea what ‘a’, ‘b’, ‘c’, and ‘f’ are, or how you define them;
답변 (1개)
the cyclist
2014년 10월 19일
편집: the cyclist
2014년 10월 19일
You could use the disp or sprintf command to have more control over what you see.
댓글 수: 1
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!