Skip to content
Snippets Groups Projects
Commit b2799b12 authored by bjje's avatar bjje
Browse files

name changes ex4

parent 4f8fab2a
No related branches found
No related tags found
No related merge requests found
Showing
with 14 additions and 33 deletions
% exercise 4.1.1 % exercise 4.2.1
% Number of samples % Number of samples
N = 200; N = 200;
......
% exercise 4.1.2 % exercise 4.2.2
% Number of samples % Number of samples
N = 100; N = 100;
......
% exercise 4.1.3 % exercise 4.2.3
% Number of samples % Number of samples
N = 1000; N = 1000;
......
% exercise 4.1.4 % exercise 4.2.4
% Number of samples % Number of samples
N = 1000; N = 1000;
......
% exercise 4.1.5 % exercise 4.2.5
% Number of samples % Number of samples
N = 1000; N = 1000;
......
%% exercise 4.1.6 %% exercise 4.2.6
% Digits to include in analysis (to include all, n = 1:10); % Digits to include in analysis (to include all, n = 1:10);
n = [1]; n = [1];
......
%% exercise 4.1.7 %% exercise 4.2.7
% Digits to include in analysis (to include all, n = 1:10); % Digits to include in analysis (to include all, n = 1:10);
n = [1]; n = [1];
......
# exercise 2.1.1
import numpy as np
x = np.array([-0.68, -2.11, 2.39, 0.26, 1.46, 1.33, 1.03, -0.41, -0.33, 0.47])
# Compute values
mean_x = x.mean()
std_x = x.std(ddof=1) # ddof: Delta Degrees of freedom
median_x = np.median(x)
range_x = x.max() - x.min()
# Display results
print("Vector:", x)
print("Mean:", mean_x)
print("Standard Deviation:", std_x)
print("Median:", median_x)
print("Range:", range_x)
print("Ran Exercise 2.1.1")
\ No newline at end of file
#################### ####################
# Exercise 4.1.1 # Exercise 4.2.1
#################### ####################
rm(list = ls()) # Clear work space rm(list = ls()) # Clear work space
......
#################### ####################
# Exercise 4.1.2 # Exercise 4.2.2
#################### ####################
rm(list = ls()) # Clear work space rm(list = ls()) # Clear work space
......
#################### ####################
# Exercise 4.1.3 # Exercise 4.2.3
#################### ####################
rm(list = ls()) # Clear work space rm(list = ls()) # Clear work space
......
#################### ####################
# Exercise 4.1.4 # Exercise 4.2.4
#################### ####################
rm(list = ls()) # Clear work space rm(list = ls()) # Clear work space
......
#################### ####################
# Exercise 4.1.5 # Exercise 4.2.5
#################### ####################
rm(list = ls()) # Clear work space rm(list = ls()) # Clear work space
......
#################### ####################
# Exercise 4.1.6 # Exercise 4.2.6
#################### ####################
rm(list = ls()) # Clear work space rm(list = ls()) # Clear work space
......
#################### ####################
# Exercise 4.1.7 # Exercise 4.2.7
#################### ####################
rm(list = ls()) # Clear work space rm(list = ls()) # Clear work space
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment