朱莉娅是否有与Ans(Matlab)或Last.value(R)等效的东西 [英] Does Julia have something equivalent to Ans (Matlab) or Last.value (R)
本文介绍了朱莉娅是否有与Ans(Matlab)或Last.value(R)等效的东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Matlab和R都具有自动分配给(分别为Ans和Last.value)的变量.
Matlab and R both have variables that are automatically assigned to the (Ans and Last.value respectively).
朱莉娅有同等学历吗?
例如
function myBigSlowFunc()
sleep(10)
return(5)
end
myBigSlowFunc()
# Can I get the value that was returned without rerunning the function?
推荐答案
如果您是代表,则可以使用ans
(就像matlab一样)
If you are at the repl you can use ans
(just like matlab)
这篇关于朱莉娅是否有与Ans(Matlab)或Last.value(R)等效的东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文