[問題] error?已回收

看板MATLAB作者 (Madchester)時間16年前 (2009/09/07 13:54), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
想請問有關於下面的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
文章代碼(AID): #1Af9_zh6 (MATLAB)
文章代碼(AID): #1Af9_zh6 (MATLAB)