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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

help with plotting piecewise function

rb3
3-Visitor
3-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

Hi,

Here is chart using the Chart Component of Prime5

 

Capture.PNG

View solution in original post

6 REPLIES 6

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

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. 

Hi

 

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

 

Capture.PNG

Hi,

Here is chart using the Chart Component of Prime5

 

Capture.PNG


Not sure if you are using Prime 15 or 14?

 


Wow! You sure are far ahead of your time 🙂

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

Top Tags