如何在gnuplot中将字符串转换为数字 [英] How to convert string to number in gnuplot

查看:228
本文介绍了如何在gnuplot中将字符串转换为数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以将代表数字的字符串(科学格式)转换为gnuplot中的数字.即

Is there a way to convert strings representing numbers (in scientific format) to numbers in gnuplot. I.e.

stringnumber="1.0e0"
number=myconvert(stringnumber)

plot [-1:1] number

我可能使用shell命令搜索myconvert.

I search myconvert possibly using shell commands.

推荐答案

您可以在字符串中添加0:

You can add 0 to the string:

stringnumber="1.0e0"
number=stringnumber + 0
plot [-1:1] number

这篇关于如何在gnuplot中将字符串转换为数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆