Converting Transfer Function to T-Domain | Matlab Plot Help Needed

In summary, the conversation discussed converting a transfer function from s-domain to t-domain format and plotting the graph of the equivalent t-domain equation using the ilaplace function. The code shown uses a specific transfer function and successfully converts it to the t-domain equation, but an error occurs when attempting to plot it due to the need to specify the range for t and use the correct syntax for plotting.
  • #1
khedira
12
0
i need to convert my transfer function to t-domain format and then plot the graph of the equivalent t-domain equation. i am using the ilaplace function to convert the s-domain transfer function to the t-domain equation.

my code is

>> f = (s + 3.1)/(s^2 +3.1*s + 2.23)

f = (s+31/10)/(s^2+31/10*s+223/100)

>> a = ilaplace(f)

a = (1/2-31/138*69^(1/2))*exp(-1/20*(69^(1/2)+31)*t)+(1/2+31/138*69^(1/2))*exp(1/20*(-31+69^(1/2))*t)

>> plot(a)
? Error using ===> plot
Conversion to double from sym is not possible.

May i know how can i plot the graph of the transfer function in t-domain? Any advise is appreciated. Thank you!
 
Physics news on Phys.org
  • #2
First of all, you never gave the range of t for the plot.
Secondly,(if I recall correctly) you should write plot(t,a(t)) not plot(a).
 
  • #3
╔(σ_σ)╝ said:
First of all, you never gave the range of t for the plot.
Secondly,(if I recall correctly) you should write plot(t,a(t)) not plot(a).

yes, you are right, i declared a range for t and it's working. Thank you.
 

FAQ: Converting Transfer Function to T-Domain | Matlab Plot Help Needed

What is Matlab Plot and how is it used?

Matlab Plot is a function in the Matlab software that allows users to create visual representations of data and mathematical equations. It is commonly used in scientific and engineering fields to analyze and present data in a clear and organized way.

How do I create a plot in Matlab?

To create a plot in Matlab, you can use the "plot" function and input the desired data or mathematical equation. You can also customize the plot by adding titles, labels, and adjusting the axis limits.

What types of plots can be created in Matlab?

Matlab offers a variety of plot types, including line plots, scatter plots, bar graphs, histograms, and more. Each type has different uses and can be customized to fit the data being presented.

How can I save and export a plot in Matlab?

You can save a plot in Matlab by using the "saveas" function and specifying the file format, such as PNG, JPEG, or PDF. You can also use the "exportgraphics" function to save the plot as an image file.

Are there any resources for learning more about Matlab Plot?

Yes, there are many online tutorials and resources available for learning more about Matlab Plot. The official Matlab website offers documentation and examples, and there are also various video tutorials and forums where you can ask for help and tips from other users.

Back
Top