How do I get the Command Window to recognize variables created in a function?
조회 수: 4 (최근 30일)
이전 댓글 표시
function [K,T] = KTBC(n)
%Create the four special matirces assuming n>1
K=toeplitz([2 -1 zeros(1,n-1)]);
T=K;T(1,1)=1
end
%Won't display T and K in command window
댓글 수: 0
채택된 답변
Amit
2014년 2월 2일
Because you have to do something like this on the command window:
[K,T] = KTBC(n)
KTBC is a function that take an input 'n' and gives two variable output. Unless you specify a name for those variables while running the function, it will go ans variable
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Whos에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!