Not create a variable on the Workspace
조회 수: 2 (최근 30일)
이전 댓글 표시
Guilherme Lopes de Campos
2019년 2월 7일
댓글: Guilherme Lopes de Campos
2019년 2월 7일
Hi MATLAB Team,
I would to ask an help please,
I am executing a function, it's works normally, but, not create the variable (such as : S, m, d2) on the workspace,
Could you help me, please?
Thank you
Guilherme Lopes
X = table2array(matrizmediad54);
function normalidade(X)
[n,p]=size(X);
m=mean(X);
S =cov(X);
% for i = 1:n
% d2(i)=(X(i,:)-m(i))*inv(S)*transpose((X(i,:)-m(i)));
% end
% em ordem crescente
d2 = X*inv(S)*transpose(X);
d2 = sort(d2)
for j=1:n
qui2(j)=chi2inv((j-0.5)/n,p)
end
plot(d2,qui2,'*k'), xlabel('d2'), ylabel('qui2'),grid
end
댓글 수: 0
채택된 답변
madhan ravi
2019년 2월 7일
function [S,m,d2]=.... callthe function with three output arguments so they appear in workspace
댓글 수: 3
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!