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!
@boshrakarim52393 жыл бұрын
(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.
@Sipho.mdluli3 жыл бұрын
ANYONE PLEASE TELL ME HOW TO ROUND UP TO TWO DECIMAL PLACE
@mr.stemedutv55143 жыл бұрын
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-d6u8 ай бұрын
music 😮💨
@GhulamNabiDar3 жыл бұрын
indeed useful especially with a practical examples you take..............
@alexanderskusnov511911 ай бұрын
w ./ h^2 without loop
@nebuladus78503 жыл бұрын
Thxsomuch👦🏽🙏🏾
@johndrofnus21313 жыл бұрын
good tutorilas
@boshrakarim52393 жыл бұрын
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.stemedutv55143 жыл бұрын
Hi Boshra, I made another video to answer your question here. kzbin.info/www/bejne/i6SkioN8esiNsLc. Hope this helps.
@anibalignaciopardoherrera6842 жыл бұрын
and how can i stop a loop plis help
@mr.stemedutv55142 жыл бұрын
please hit ctrl+c stop the infinite loop.
@anibalignaciopardoherrera6842 жыл бұрын
@@mr.stemedutv5514 thks i am goin to try it now :3