Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
My goal is to produce a graph of ST vs pi(c) which is a variable from 5-60 with increments of 2 (dimensionless value). I have no idea why the value of tau(c) on the graph has an error and it said that this value must be a scalar. the value tau(c) should be dimensionless as well. Any help would be greatly appreciated.
@JC_10087629 wrote:
My goal is to produce a graph of ST vs pi(c) which is a variable from 5-60 with increments of 2 (dimensionless value). I have no idea why the value of tau(c) on the graph has an error and it said that this value must be a scalar. the value tau(c) should be dimensionless as well. Any help would be greatly appreciated.
Your problems arise because you have defined tau.c and tau.t as functions [the notation f(x):=3x defines a function f with a single parameter x].
You've also defined them as parameters to ST, which would be OK (if somewhat open to misinterpretation). However, plot neither knows nor cares what names you give to a function's parameters. All the plot knows is that you taus are function - hence, the error
Stuart
PS. Forum etiquette prefers it if you post a worksheet.
Ideally, one should post both an image and a worksheet.
Now the solution is pretty simple:
That is: Call the function ST with the proper parameters, functions in your case.
Success!
Luc
You could also:
Which gives (something like):
And following that, plot ST simply with:
Success!
Luc