Mathematica Asked by Chowdhury Aminul Islam on October 13, 2020
”’With[{k = {1, 10}}, Plot[k*x^2, {x, 0, 1}]]”’
I want to use two separate colours for two k values. How to do that? Thanks in advance.
Wrap the first argument of Plot
with Evaluate
With[{k = {1, 10}}, Plot[Evaluate[k*x^2], {x, 0, 1}]]
Alternatively, add the option Evaluated -> True
:
With[{k = {1, 10}}, Plot[k*x^2, {x, 0, 1}, Evaluated -> True]]
same picture
Correct answer by kglr on October 13, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP