Git Product home page Git Product logo

math-with-python's Introduction

Math + Python

Plotting a Graph

Plot the graph of the function f(t) = sin(t) in the interval [-ฯ€, ฯ€], with red dots. Label the x-axis and y-axis with "time" and "value", respectively.

Creating Matrices

Define the following matrices using the numpy library:

A: A matrix of all zeros.

B: A matrix of all ones.

C: A diagonal matrix of size 5x5.

D: A matrix in the form:

Random Matrix

Create a random matrix and compute its determinant.

Indexing

Define a matrix as follows:

Print the following submatrices:

  • The first row of the matrix
  • The first column of the matrix
  • The first three rows and columns of the matrix
  • The last row of the matrix
  • The last column of the matrix
  • The last three columns of the matrix
  • The last three columns of the first three rows of the matrix
  • The diagonal of the matrix
  • The odd-numbered rows (1st, 3rd, 5th, etc.) of the matrix
  • A matrix B such that its first row is the last row of A, its second row is the second-to-last row of A, and its last row is the first row of A.
  • A matrix D that consists of the odd-indexed rows and even-indexed columns of A.

3D Plot

Plot the function f(x,y) = x^2 + y^2 over the interval [-3, 3].

Plotting Multiple Graphs

Plot the functions f(x) = sin(x) and g(x) = cos(x) in the following ways:

  • In a single plot
  • In two separate plots
  • In a single plot with two subplots

math-with-python's People

Contributors

sabamadadi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.