Maxima ezunits:将一个单位应用于列表的所有元素(Maxima ezunits: apply a unit to all elements of a list)
自从我发现了
ezunits
包以后我在Maxima中广泛使用它,但是我找不到一种令人满意的方法来将一个单元应用于列表的元素。例如
[1,2,3]`hour
显然有效a: [1,2,3]`hour; >> [1,2,3] ` hour (5`km)/a[2]; >> 5/2 ` km/hour
但我无法循环它
makelist((5`km)/x, x, [1,2,3]`hour); >>> makelist: third argument must be a number or a list; found: [1.0,2.0,3.0] ` hour
然而,如果我手动将单位应用于列表的每个元素,一切都有效:
makelist((5`km)/x, x, [1`hour,2`hour,3`hour]); [5 ` km/hour,5/2 ` km/hour,5/3 ` km/hour]
提前感谢您提供的任何帮助。
Since I discovered the
ezunits
package I make extensive use of it in Maxima, but I could not find a satisfactory way to apply a unit to the elements of a list.For example
[1,2,3]`hour
apparently worksa: [1,2,3]`hour; >> [1,2,3] ` hour (5`km)/a[2]; >> 5/2 ` km/hour
but I cannot loop through it
makelist((5`km)/x, x, [1,2,3]`hour); >>> makelist: third argument must be a number or a list; found: [1.0,2.0,3.0] ` hour
whereas, if I apply manually the unit to each element of list, everything works:
makelist((5`km)/x, x, [1`hour,2`hour,3`hour]); [5 ` km/hour,5/2 ` km/hour,5/3 ` km/hour]
Thanks in advance for any help you will be able to give.
原文:https://stackoverflow.com/questions/40610269
更新时间:2022-03-09 13:03
相关问答
更多-
如何解决iOS9.2上的Xcode错误“无法找到开发者磁盘映像”(How to Fix Xcode Error “Could not find Developer Disk Image” on iOS9.2)[2023-06-28]
通过下载XCode 7.2 dmg来修复它并将其作为新副本安装。 要么 卸载退出并直接从App Store下载新版本的xcode。 在SO上看同一个线程 。 如果你去更新那里也有一些问题看这个 。 Fix it by downloading XCode 7.2 dmg and installed it as a new copy. or Uninstall exiting one and directly download new version of xcode from App Store. Have ... -
1)我经历过同样的问题,我的Xcode版本是7.0.1 ,我将iPhone更新到9.2版 ,然后使用Xcode,我的iPhone显示在不可用的设备部分。 就像下面的图片: 2)然后我以某种方式设法通过点击选择我的iPhone 产品 - >目的地 - >不可用设备 3)但是没有解决我的问题,它开始显示: 找不到开发人员磁盘映像 解决方案)然后我终于从这里下载了最新版本的Xcode版本7.2 ,一切都对我来说很好。 更新:每当iPhone设备版本高于Xcode版本时,您可能会遇到同样的问题,因此您应该更新Xco ...
-
如果您使用的是Xcode 7 GM版本7A218 ,那么您不小心下载了iOS 9.1( 13B5110e ),而不是iOS 9 GM版本( 13A340 )。 我做同样的事情不用担心。 他们在下载页面上彼此太靠近:0 您可以通过简单地转到设备设置>常规>关于>版本来检查您的设备上的哪个版本 所有你需要做的是下载正确的iOS 9 GM构建,并转到iTunes。 点击您的设备。 在摘要选项卡中, OPTION +右键单击“检查更新”,并通过导航到iOS 9 GM构建查找器位置来恢复设备。 通过选择“检查更新”, ...
-
Xcode 6:iOS 8.1无法安装开发人员磁盘映像(Xcode 6: iOS 8.1 The Developer Disk Image could not be mounted)[2023-07-08]
Xcode 6只包含iOS 8.0 SDK。 如果您在手机上运行iOS 8.1,则需要升级到包含iOS 8.1 SDK的Xcode 6.1 。 Xcode 6 only contains the iOS 8.0 SDK. If you're running iOS 8.1 on your phone, then you'll need to upgrade to Xcode 6.1, which contains the iOS 8.1 SDK. -
你的xCode版本太旧了。 您可能已将手机的操作系统更新为更新版本。 通常对于每个版本的iOS都有一个版本的xCode,如果操作系统比xCode更新,则会出现此错误。 Your xCode version is too old. Probably you updated the phone's OS to a newer version. Usually for each version of iOS there is a version of xCode, and if the OS is newer t ...
-
Xcode错误“找不到开发者磁盘映像”10.3.1修复?(Xcode error “Could not find Developer Disk Image” 10.3.1 Fix?)[2022-05-15]
我不认为苹果曾经单独发布过开发者磁盘映像,所以我无法想象它们将来会如何。 解决下载问题可能更容易,不要使用App Store,因为在带宽有限的连接上下载相当悲惨,而是访问https://developer.apple.com/download/more/ 。 他们有实际的文件托管在那里,所以你可以用更合适的工具得到它们,你也会知道它们绝对是来自Apple。 I don't think Apple has ever released the developer disk images separately s ... -
我认为它尚未更新,但它可能处于下载状态。 所以在它下载后,问题将在重新打开后得到纠正。 I think it is not updated yet it may be in downloading status. so after it dowloaded the problem will be rectified once it is reopened.
-
您的Xcode(7.3.1)未更新。 在这里更新你的Xcode。 Your Xcode(7.3.1) is not updated. update your Xcode here.
-
你的意思是固件的IPSW? 谷歌有一些好的结果: http://www.iphoneheat.com/2009/03/download-iphone-firmware-files-all-at-one-place/ you mean the firmware's IPSW ? Google has some good results: http://www.iphoneheat.com/2009/03/download-iphone-firmware-files-all-at-one-place/
-
找不到开发人员磁盘映像 - Xcode 7.2和iOS 9.2(Could not find Developer Disk Image - Xcode 7.2 & iOS 9.2)[2023-04-03]
当我安装El Capitan时(通过在Mac上激活FileVault,摆脱了“稀疏逻辑卷组上不允许此核心存储操作”错误),我看到一个Xcode对话框,说它需要安装其他组件。 我不确定在升级OS X之前是否有对话框存在,因为它可能在其他应用程序窗口中丢失。 无论哪种方式,似乎已经安装了在iPhone上运行应用程序所需的磁盘映像。 编辑:这确实没有解决问题。 我意识到我的Mac仍在运行Xcode 7.1.1而不是7.2,尽管Mac App Store已经将其更新到7.2。 我所做的是从/ Application ...