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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Multiple Range Variable

Jacob_S
6-Contributor

Multiple Range Variable

Hi,

I need help to figure out how to plot  different values of Rac (Disabled region in attached file) against Frequency(F)

 

Thank you

Jacob

1 ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:Jacob_S)

Outside of the function definition you have defined Rac as a value with units.

You've defined

H(w,Rac):=....

Here w and Rac are parameters to the function H. There is NO relationship between the parameter Rac and the variable Rac that you defined before. But the variables L and C are defined before the function, with value and unit. The function definition uses those variables, and their units, and finds that the definition of H is not unit-balanced. So you must add a unit to the parameter Rac within the function definition to correct that. That subsequently means that when calling H (as you do in the plot) you have to provide the resistor value for the parameter Rac without unit, otherwise you get another unit-unbalance.

If, instead, you had defined the function H as:

H(w):=....

Then the function would be defined with the variable Rac, as defined before, outside of the function, but that makes it more cumbersome to plot the function for various values of Rac.

The most versatile method is to define H with all parameters, like:

H(w,R,L,C):=...

Then you can define the values for w, R, L, and C and plot it.

LucMeekes_0-1624006648972.pngLucMeekes_1-1624006746703.png

Success!
Luc

 

View solution in original post

12 REPLIES 12
LucMeekes
23-Emerald III
(To:Jacob_S)

See attached.

 

I hope this helps.

 

Success!
Luc

Jacob_S
6-Contributor
(To:LucMeekes)

Hi,

I did 't add the correct attachment initially, However question remains the same.

How can I plot for Variable values of Rac Versus Frequency(F)

 

Hi,

To plot what you intend you need the same number of points on both scales.

This can be achieved like the enclosed file.

 

Cheers

Terry

 

Hi Terry,

Thank you very much for your patience and willingness to help., I think you are ine right direction. Will you please this attachment and reply

Jacob

Hi,

Programming is not necessary.

To plot a family of curves there is no automatic way you have to use Plots | Traces | Add Trace on the ribbon manually to get another line.

Capture1.JPG

I do not have a electrical background so cannot answer your questions about j*2*pi*f.

Cheers

Terry

Thank you very much @terryhendicott 

ttokoro
20-Turquoise
(To:Jacob_S)

image.png

Jacob_S
6-Contributor
(To:ttokoro)

Hi,

Thank you for   helping. Can you review the attached question?

@ttokro 

ttokoro
20-Turquoise
(To:Jacob_S)

Without *1Ω, we must put ohm unit every time. 

 

image.pngimage.pngimage.png

Jacob_S
6-Contributor
(To:ttokoro)

Thank you @ttokoro 

LucMeekes
23-Emerald III
(To:Jacob_S)

Outside of the function definition you have defined Rac as a value with units.

You've defined

H(w,Rac):=....

Here w and Rac are parameters to the function H. There is NO relationship between the parameter Rac and the variable Rac that you defined before. But the variables L and C are defined before the function, with value and unit. The function definition uses those variables, and their units, and finds that the definition of H is not unit-balanced. So you must add a unit to the parameter Rac within the function definition to correct that. That subsequently means that when calling H (as you do in the plot) you have to provide the resistor value for the parameter Rac without unit, otherwise you get another unit-unbalance.

If, instead, you had defined the function H as:

H(w):=....

Then the function would be defined with the variable Rac, as defined before, outside of the function, but that makes it more cumbersome to plot the function for various values of Rac.

The most versatile method is to define H with all parameters, like:

H(w,R,L,C):=...

Then you can define the values for w, R, L, and C and plot it.

LucMeekes_0-1624006648972.pngLucMeekes_1-1624006746703.png

Success!
Luc

 

Jacob_S
6-Contributor
(To:LucMeekes)

Thank you @LucMeekes  for taking time to give a very detailed answer. I really appreciate this

Jacob

Top Tags