(Solved): SOLVE USING PYTHON!!!
SOLVE USING PYTHON!!!
SOLVE USING PYTHON!!!
In the lec ...
SOLVE USING PYTHON!!!
SOLVE USING PYTHON!!!
SOLVE USING PYTHON!!!???????
In the lectures we focused on the \( L^{2} \)-norm. We also briefly mentioned the \( L^{1} \) and \( L^{\infty} \) norm. Let's look at calculating those as well for a general \( m \times n \) matrix. The \( L^{1} \) norm is given by \[ \|A\|_{1}=\max _{j} \sum_{i=1}^{m}\left|a_{i j}\right| \] i.e., it is the max of the sums of the absolute values of each column. Write a function that computes the \( L^{1} \)-norm using only loops. The function should use no special numpy functions except np.abs() ( np. shape, np.inf, etc are ok to use). In \( [42]: \mathbf{X} \) Check your result against NumPy's la. norm \( (A, 1) \) function for the following random matrix In [5]: \( \boldsymbol{X} \)
The \( L^{\infty} \) norm is given by \[ \|A\|_{\infty}=\max _{i} \sum_{j=1}^{n}\left|a_{i j}\right| \] i.e., it is the max of the sums of the absolute values of each row. Write a function that computes the \( L^{\infty} \)-norm using only loops and no special numpy functions.