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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

Students also viewed these Databases questions