cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

help with plotting piecewise function

SOLVED
Highlighted
rb3
Visitor

help with plotting piecewise function

Hi, can someone help me, I cannot figure out what I am doing wrong in this.  The error I get is that the value must be a scalar.

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Re: help with plotting piecewise function

Hi,

Here is chart using the Chart Component of Prime5

 

Capture.PNG

6 REPLIES 6

Re: help with plotting piecewise function

Hi,

Because you have not included the Prime sheet I have expressed the function in terms of all the input values.

Not sure if you are using Prime 15 or 14?

In your sheet T is a range variable so the comparison with a single variable T0 cannot be done.

 

Capture.PNG

 

Cheers

Terry

Re: help with plotting piecewise function No 2

Hi,

 

Forgot you also need to include what happens when T is equal to the comparison boundary limits.

Here is one way.

 

Capture.PNG

 

Cheers

Re: help with plotting piecewise function

Hi Terry,  I'm using Prime 5 and I'm ultimately trying to plot the piecewise function that I was attempting to define with the code posted.  I made those changes, but it still is not working.  T0 is a single value, where T is an array, I tried a while loop to populate Sa but I could not get that to work either.  I'm just trying to populate Sa with values and then plot Sa and T. 

Re: help with plotting piecewise function

Hi

 

Here is the plot with some values assigned to the variables.  T is a vector of values.

 

Capture.PNG

Re: help with plotting piecewise function

Hi,

Here is chart using the Chart Component of Prime5

 

Capture.PNG

Re: help with plotting piecewise function


Not sure if you are using Prime 15 or 14?

 


Wow! You sure are far ahead of your time :-)