<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />嗨,
我正在嘗試創建一組代表漸變函數傳播的列。 為此,我使用以下公式。 雖然公式語法似乎正確,但該公式不適用於665之前的行。 有任何建議或解決方法嗎?我已經評論了可疑的錯誤。 我正在使用JMP11。
謝謝!
//傳播斜坡函數:
dt =新表(“公式不工作”,
添加行(25000),
新欄目(“RAMP 01”,
數字,
連續,
公式(If(行()<601,0,If(行()<4441,滯後(:RAMP 01,1)+ 1/3840,If(行()<5001,1,滯後(:RAMP 01,5000) )))))
)
新欄目(“RAMP 02”,
數字,
連續,
式(
如果(
Row()<601,:RAMP 02 [601,Empty()],
Row()== 601,:RAMP 02 [4377,Empty()],//我懷疑這個下標函數不起作用,雖然語法正確且Row(4377)有值。 有任何想法嗎?
行()<665,滯後(:RAMP 02,1)+ 1/3840,
行()<4441,滯後(:RAMP 01,64),
Row()<5001,:RAMP 02 [4440,Empty()],
滯後(:RAMP 02,5000)
)
)
)
新欄目(“RAMP 03”,
數字,
連續,
式(
如果(
Row()<601,:RAMP 03 [601,Empty()],
Row()== 601,:RAMP 03 [4377,Empty()],
行()<665,滯後(:RAMP 03,1)+ 1/3840,
Row()<4441,Lag(:RAMP 02,64),
Row()<5001,:RAMP 03 [4440,Empty()],
滯後(:RAMP 03,5000)
)
)
)
新欄目(“RAMP 04”,
數字,
連續,
式(
如果(
Row()<601,:RAMP 04 [601,Empty()],
Row()== 601,:RAMP 04 [4377,Empty()],
行()<665,滯後(:RAMP 04,1)+ 1/3840,
Row()<4441,Lag(:RAMP 03,64),
Row()<5001,:RAMP 04 [4440,Empty()],
滯後(:RAMP 04,5000)
)
)
)
新欄目(“RAMP 05”,
數字,
連續,
式(
如果(
Row()<601,:RAMP 05 [601,Empty()],
Row()== 601,:RAMP 05 [4377,Empty()],
行()<665,滯後(:RAMP 05,1)+ 1/3840,
Row()<4441,Lag(:RAMP 04,64),
Row()<5001,:RAMP 05 [4440,Empty()],
滯後(:RAMP 05,5000)
)
)
)
新欄目(“RAMP 06”,
數字,
連續,
式(
如果(
Row()<601,:RAMP 06 [601,Empty()],
Row()== 601,:RAMP 06 [4377,Empty()],
行()<665,滯後(:RAMP 06,1)+ 1/3840,
Row()<4441,Lag(:RAMP 05,64),
Row()<5001,:RAMP 06 [4440,Empty()],
滯後(:RAMP 06,5000)
)
)
)
);
你好MS,
謝謝您的幫助。 我無法單獨使用腳本來完成該功能。 我最終通過編輯帶註釋的行來引用另一列,然後將其更改回來,使公式工作。 之後它起作用了。
看起來JMP以行順序評估公式,並且在例如行601的第一次評估時,行602中的單元格中沒有(尚未)任何值。
重新運行公式應該這樣做:
等待 ( 1 ) ; //讓第一次評估完成!
DT << 重新運行公式 ;