How to Use the sum Function in MATLAB | Matlab Tutorial | Summation function in MATLAB

Поділитися
Вставка
  • Опубліковано 12 гру 2024

КОМЕНТАРІ • 5

  • @mysatury
    @mysatury 19 днів тому

    Hi Thanks for your video :) Quick question!
    At 06:10, the result after first sum function will be [10 14] and after that the second sum function will be done. But as I know, just sum function returns a value of the sum of columns. So I have no idea why it works. Should it be like " sum(sum(A([1,3], [2,4])),2) ?

    • @mysatury
      @mysatury 19 днів тому

      Just in case, is that rule for over 2x2 matrix?

  • @SumitKumar-m3o9u
    @SumitKumar-m3o9u 15 днів тому

    Dear sir,
    Thank you for such an amazing video.
    I have a quick question that I want to add the 4*4 matrix diagonally, So what will be the script for that one.
    I have tried all the possible way but I cant find it or It is not possible to add it diagonally.

  • @aryantambe8213
    @aryantambe8213 4 дні тому

    how do i add the diagonal using the sum function?

  • @balasubbramani7670
    @balasubbramani7670 12 днів тому

    selected_colums_sum = sum(A(:,[1,3]))