Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write in Matlab program. my_reshape Write a function my_reshape that returns a m x n matrix B, whose elements are taken columnwise from row

image text in transcribedimage text in transcribedPlease write in Matlab program.

my_reshape Write a function my_reshape that returns a m x n matrix B, whose elements are taken columnwise from row vector A of length m xn For example if, A [146378] and m 2, and n = 3, then Your function must return -1 if A does not havem x n elements. Following is the signature of the function function B-my_reshape (A,m,n) Inputs: A- a row vector of length m x n Output B- a matrix of size m x n Note: This function must use loops rather than MATLAB built-in functions such as reshape, fliplr, flipud. Code to call your function 1 A [1 4 6 3 7 81 2 m 2; B-my-reshape (A , m , n) 5 4

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

=+ Why do we have markets and, according to economists,

Answered: 1 week ago