Skip to content

Instantly share code, notes, and snippets.

View parthp08's full-sized avatar

Parth Viradiya parthp08

View GitHub Profile
import subprocess
from PIL import ImageFont
import random
import os
import shutil
os.getcwd()
def fit_text(string: str, frame_width, translation_font):
split_line = [x.strip() for x in string.split()]
lines = ""
@parthp08
parthp08 / rh_stability.m
Created November 10, 2021 01:41
determines stability of a transfer function using Routh-Hurwitz criterion
function isStable = rh_stability(TF)
% RH_STABILITY determines stability of a transfer function using Routh-Hurwitz criterion
% isStable = rh_stability(TF) checks the stability of transfer function tf.
if (class(TF) ~= "tf")
error("input argument must be of type 'tf' (transfer function).");
end
% get the denominators of tf
TF = tf(TF); % compute the polynomial if tf is in form of zpk