Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider an array, a = [19 2 3 4 55 6 7 8 91]. Now write down a MATLAB program using if-else, for, and/or while

Consider an array, a = [19 2 3 4 55 6 7 8 91]. Now write down a MATLAB program using if-else, for, and/or while loop which will transform this array into a square matrix like below. 119 3 (Ex: output will be 4 55 6 D 91. 2 7 8 8. Repeat previous problem (8) in opposite way, means input will be square matrix, output will be an array. EEE 221. ETE 221 Lab (NSU) Lab Instructor: Mehrab Hossain Likhon Email: mehrab.hossain @ northsouth.edu 9. Consider an array, m=[11 14 21 44 57]. Now write down a MATLAB program using if-else, for, and/or while loop which will transform this array into a square matrix like below. r57 0 0 0 0 0 44 0 0 0 (Ex: output will be o 0 21 0 0 1 0 0 8 14 0 0 0 0 0 11 10. Write a MATLAB program which will take the value of a radius \"r\" of a circle / sphere from user. Then i. If the user press 'a', the program will find the area of the circle ii. If the user press 'v', the program will find the volume of the sphere iii. If the user press 's', the program will find the surface area of the sphere




Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions