[問題] error?已回收
想請問有關於下面的error message
Error in ==> Main_Procedure at 4
A_matrix = sparse([A_matrix -eye(size(A_matrix, 1))]);
??? Output argument "trial_t" (and maybe others) not assigned during
call to "D:\A\B\coding\D\Main_Procedure.m
(Main_Procedure)".
Error in ==> Algorithm_A2 at 36
[trials lower_bound upper_bound] = Main_Procedure(policy, A, b);
我的變數 trial_t 是在計算我的程式中某個while loop的次數
function [trial_t lb ub] = Main_Procedure(Basis, A_matrix, rhs)
....
tt = 1;
while ~condition
..........
tt =tt + 1;
end
trial_t = tt;
上面的error是有時候才會遇到的狀況
也就是說 有時候 我可以成功的印出 trial_t
但有時候就會出現上面的error
(基本上 程式還沒開始跑 就出現錯誤了orz
第四行是我這個程式的第一行)
我把這個變數拿掉之後 就恢復正常
可是 我會需要這個變數
不知道這是什麼樣的問題? 有人有遇過嗎?
謝謝:)
--
Kraft Durch Freude~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.127.21
MATLAB 近期熱門文章
PTT數位生活區 即時熱門文章