Computing logarithms and roots in MATLAB

1 comment
MATLAB: The Language of Technical Computing
MATLAB: The Language of Technical Computing

Welcome! 

In today's post, we will be finding logarithms, both natural logarithms and logarithms to an arbitrary base. Also we would be finding roots of numbers; square roots, cube roots and eventually nth roots, where n can be any integer.

Hence lets get started!




Plotting Trigonometric Functions in MATLAB

Leave a Comment
MATLAB: The Language of Technical Computing
MATLAB: The Language of Technical Computing

Welcome! Today's post is going to be exciting! We are going to finally use MATLAB to plot graphs!

Plotting of graphs is a fundamental step in mathematical analysis. Plotting a graph helps us visualize the function the graph is of. Hence we must learn how to do it at an early stage.

In this post, we are going to plot trigonometric functions like:

  • sine
  • cosine
  • tangent
  • secant
  • cosecant
  • cotangent
Hence let's get started!



Rounding off numbers using Round, Floor, Ceil and Fix functions in MATLAB

Leave a Comment
MATLAB: The Language of Technical Computing
MATLAB: The Language of Technical Computing

Welcome once again to a new session of MATLAB!

Today we are going to learn some number rounding functions. Since numbers are what we deal with at almost all times in MATLAB, it is important we learn some operations upon them. Today's session will enable you to round off numbers in MATLAB in different ways according to the different needs one may face while working with MATLAB.

The functions that we would be studying together would be:

  • Round Function
  • Floor Function
  • Ceil Function
  • Fix Function
Hence lets get started!



Finding Cumulative Sum of elements in a matrix with/without loops

Leave a Comment
MATLAB: The Language of Technical Computing
MATLAB: The Language of Technical Computing

Hello and Welcome to everyone once again. Today we would be learning how to generate cumulative sum of elements with and without using loops.

Chances are, if you didn't know what cumulative sum, loops and MATLAB are, you wouldn't be here in the first place, hence I wouldn't be taking the trouble of explaining cumulative sum or loops to you here.
But still, for an introduction

  • Cumulative Sum: Quoting from mathworld.wolfram.com, "a cumulative sum is a sequence of partial sums of a given sequence. For example, the cumulative sums of the sequence {a,b,c,...}, are (a), (a+b), (a+b+c), ...."
  • Loops: Loops are iterative statements. They are used when a fixed set of code needs to be executed again and again until a condition or a set of conditions are satisfied. They are of many types. In this article, we would be using the for loop.
  • Running Sum/Total: "A running total is the summation of a sequence of numbers which is updated each time a new number is added to the sequence, by adding the value of the new number to the previous running total. Another term for it is partial sum."
    It is just the same as Cumulative Sum, with the only difference that as compared to Cumulative Sum, where the total sum is calculated and displayed at once, in Running Sum, just as the definition says, sum is calculated in steps, every time a new new element is added to the sequence.
So lets get started!



Relational and Logical Operations in MATLAB

Leave a Comment
MATLAB: The Language of Technical Computing
MATLAB: The Language of Technical Computing

Welcome once again, to a new post on MATLAB!

Today as you might have read from the title, we are going to learn about Relational and Logical Operations that we can perform in MATLAB over arrays. Matrices can undergo relational and logical operations made up of GREATER/ LESSER THAN, (NOT) EQUAL TO, XOR, OR, AND, NOT operators in MATLAB. To learn that first, we must first learn about relational and logical operators in general.



Matrix Manipulations

Leave a Comment
MATLAB: The Language of Technical Computing
MATLAB: The Language of Technical Computing

Hey folks!
Today's lesson is gonna go big! While the previous lesson was just on making simple matrices and performing simple operation over them, today's lesson is gonna go advanced.
Once a matrix is made, it needs to be manipulated. Learn how to concatenate, index, randomize, sort, shift, reshape/resize, rotate, flip matrices with proper code snippets!



Powered by Blogger.