問題タブ [xrange]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
3 に答える
789 参照

python - イテレータとしての xrange とチャンク

スニペット

異なる振る舞いをします。私は得ることを期待した

最初のスニペットでも同様ですが、返されます

代わりは。暗黙のコンテナが静かにコピーされているようです。誰かがここで何が起こっているのか説明できますか? そのようなセマンティクスを選択する背後にある推論。

0 投票する
1 に答える
869 参照

plot - 1 つのプロットにプロットされた複数のデータ ファイルのドメインを制限する gnuplot

作成した .plt ファイルを使用して、さまざまなファイルのデータにアクセスしています。各データセットの特定のドメインのみが重要です。各データセットの特定のドメインのみを 1 つのグラフにプロットしようとしています。

各ドメインのデータはピークに対応します。これらの各ピークをプロットしてから、指数関数的減衰関数をピークに当てはめたいと思います。

私のプロットファイルのコードは次のとおりです。

これにより、適切なドメインが得られます。

ここで、任意の x 値を超えて、y 軸上でデータ ポイントを反転させたいと考えています。それらをネガティブにしたい。

コマンドを試しましたflipyが、これは機能しませんでした。

0 投票する
1 に答える
69463 参照

python - 名前 'xrange' は Python 3 で定義されていません

次のコードを実行しようとしましたが、間違って実行できません: name 'xrange' is not defined

0 投票する
2 に答える
11676 参照

gnuplot - gnuplot - Does `set xrange [x_min:x_max]` limit the ranged used for function fit?

Simple question - the range drawn on a plot can be changed with the set xrange [x_min:x_max] command.

Does this command also limit the range used when fitting a function using the data fitting tools in gnuplot? Is there a way to manually specify the ranged used for function fits? (One guess might be the command every? Do I need to over-ride xrange using every?)

The reason I ask is that I am using xrange to plot outputs zoomed in on the low value x region to view transient behaviour more clearly, but I think this may be "slicing off" values from the function fitting at larger x values outside the xrange region selected?

0 投票する
2 に答える
715 参照

python - reversed() 対 xrange()

リストを逆方向にトラバースする必要があります。xrange() と reversed() について読みました。どちらがより高価ですか?

0 投票する
1 に答える
67 参照

python - xrange リストからスペースを削除する方法 - Python

私が持っているとしましょう:

結果は次のとおりです。

これらのスペースをすべてリストから削除する必要があるため、次のようになります。

0 投票する
1 に答える
411 参照

ruby - Rubyで日付を使用するGNUPlot xrange

csv ファイル「harvest.csv」があり、列の 1 つに日付が含まれています。ここに私が来たものがあります(plot.rb):

plot.rb を実行すると、エラーが発生します。

[日付] を別のものに変換する必要がありますか?