Тёмный

Octave Tutorial #12: For Loop Statements for Absolute Beginners (BMI Calculation) 

Mr. STEM EDU TV
Подписаться 5 тыс.
Просмотров 9 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@mr.stemedutv5514
@mr.stemedutv5514 3 года назад
Hope this tutorial video is useful for you who would like to learn Matlab and GNU Octave, and please let me know if you have any questions and comments!
@boshrakarim5239
@boshrakarim5239 3 года назад
(a) Use for-end loops to create a 5*5 matrix in which the value of each element is the difference of its cubic indices (i.e. the cubic row number subtract the cubic column number of the element). For example, the value of element A(3,4) is 3^3 - 4^3 = -37). Show the script file and the result of the matrix A. (b) Use for-end loops and if-end to count (1) how many elements in the above matrix A have the value equal to zero, (2) how many elements in the above matrix A have the positive value, and (3) how many elements in the above matrix A have the negative value. Show the script file and the total number of counted elements in above three cases.
@GhulamNabiDar
@GhulamNabiDar 3 года назад
indeed useful especially with a practical examples you take..............
@alexanderskusnov5119
@alexanderskusnov5119 Год назад
w ./ h^2 without loop
@johndrofnus2131
@johndrofnus2131 3 года назад
good tutorilas
@nebuladus7850
@nebuladus7850 3 года назад
Thxsomuch👦🏽🙏🏾
@boshrakarim5239
@boshrakarim5239 3 года назад
Could you help me to solve part (b) for this problem?: (a) Use for-end loops to create a 5*5 matrix in which the value of each element is the difference of its cubic indices (i.e. the cubic row number subtract the cubic column number of the element). For example, the value of element A(3,4) is 3^3 - 4^3 = -37). Show the script file and the result of the matrix A. (b) Use for-end loops and if-end to count (1) how many elements in the above matrix A have the value equal to zero, (2) how many elements in the above matrix A have the positive value, and (3) how many elements in the above matrix A have the negative value. Show the script file and the total number of counted elements in above three cases.
@mr.stemedutv5514
@mr.stemedutv5514 3 года назад
Hi Boshra, I made another video to answer your question here. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-UsAYPFEcZzU.html. Hope this helps.
@Sipho.mdluli
@Sipho.mdluli 3 года назад
ANYONE PLEASE TELL ME HOW TO ROUND UP TO TWO DECIMAL PLACE
@mr.stemedutv5514
@mr.stemedutv5514 3 года назад
A couple of different options. 1) use built-in "round function" in Matlab, for example, type "round(pi,2)" to round up the constant "pi" to 2 decimal place. 2) use the built-in function "fprintf", for example, type "fprintf('%.2f ',pi)". Hope this helps.
@DivyanshDwivedi-d6u
@DivyanshDwivedi-d6u 8 месяцев назад
music 😮‍💨
@anibalignaciopardoherrera684
@anibalignaciopardoherrera684 3 года назад
and how can i stop a loop plis help
@mr.stemedutv5514
@mr.stemedutv5514 3 года назад
please hit ctrl+c stop the infinite loop.
@anibalignaciopardoherrera684
@anibalignaciopardoherrera684 3 года назад
@@mr.stemedutv5514 thks i am goin to try it now :3
Далее
Learn JavaScript FOR LOOPS in 5 minutes! 🔂
5:45
Просмотров 41 тыс.
For Loops in R
11:34
Просмотров 209 тыс.
For Loops in Python
10:15
Просмотров 804 тыс.
How To... Embed an if Statement in a for Loop in R #46
7:08