0
Scilab Question
Assuming that the voltage and current of a system can be described by the following two functions. v(t) = 10*cos(2*pi*t) i(i) = 5*sin(pi*(1+t)) Write a Scilab program that displays the plot of these two graphs, from 0 †t †50 ms, in a single window. The horizontal axis should be uniformly spaced. Include all necessary information on the graph ( such as axes label, legend etc)
3 Answers
+ 1
I have never heard of SciLab, but I guess this can help a bit:
import matplotlib.pyplot as plt
from numpy import sin,cos,pi,linspace
# your functions
v = lambda t: 10*cos(2*pi*t)
i = lambda t: 5*sin(pi*(1+t))
# range of t
x = linspace(0,50,100)
# adding values of v() and i() with their labels
plt.plot(x,v(x),label='v(x)')
plt.plot(x,i(x),label='i(x)')
# labeling axes
plt.xlabel('x axis')
plt.ylabel('results')
# adding a legend and showing the plot
plt.legend()
plt.show()
+ 2
A so that is ... I would like to try SciLab right away if this is so đ
0
Thank you Ervis Meta - SoloHelper you helped a lot đđ scilab is like matlab but a free version and open source