필터 지우기
필터 지우기

Simple Question

조회 수: 1 (최근 30일)
Oliver
Oliver 2012년 3월 15일
Hi all,
I'm trying to write an M-file or function that has the following lines:
CM = xlsread('Risk_Budget_Tano.XLS','sheet1','B23:Q38')
AE = xlsread('Risk_Budget_Tano.XLS','sheet1','D2:D17')
Vol = xlsread('Risk_Budget_Tano.XLS','sheet1','F2:F17')
TE = sqrt(AE' * CM * AE)
fprintf('The portfolio Tracking Error is: ', TE)
However, when I run them. It gave me error on 'Risk'. Could anybody help/teach me how to write the above function please?
Thanks heaps.
Oliver.
  댓글 수: 3
Image Analyst
Image Analyst 2012년 3월 16일
Are you sure all those workbooks are in the "Current Folder"? If they aren't then you need to specify the full path (folder + base filename + extension) of the workbook. It would be a good idea to use exist(filename, 'file') to check that the file exists before you call xlsread().
KSSV
KSSV 2012년 3월 16일
Hi
are you getting any complex number in TE? Check is there any complex number.
Sreenu

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Parallel Server에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by