Scilab Question | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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)

9th Apr 2022, 10:06 AM
🏐Volley
🏐Volley - avatar
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()
9th Apr 2022, 11:35 AM
Ervis Meta
Ervis Meta - avatar
+ 2
A so that is ... I would like to try SciLab right away if this is so 😆
9th Apr 2022, 11:58 AM
Ervis Meta
Ervis Meta - avatar
0
Thank you Ervis Meta - SoloHelper you helped a lot 😊😊 scilab is like matlab but a free version and open source
9th Apr 2022, 11:56 AM
🏐Volley
🏐Volley - avatar