Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Function [x] = function a(x) %This will take the squareroot of 2 times every value of x x = squareroot (2 * x): function [x]

image text in transcribed

Function [x] = function a(x) %This will take the squareroot of 2 times every value of x x = squareroot (2 * x): function [x] = function b(x) %This determines the row and column dimensions of x [rows, columns] = size (x): %This sums all of the values of each row of x, resulting in a %column array of sums y = zeros (rows, 1): for i = 1: rows for j = 1: columns y(i) = y(i) + x(i, j): end end x = y: function [x] = function_c(x) %This takes the transpose of x x = x': Using only a function header and calls to the three functions above, write a new function that takes one input, a matrix, and returns one output, a single number. That number should be the sum of the squareroot of every number in the original matrix multiplied by 2, as in sum( squareroot (number * 2)). For example, if your original matrix was: [2 2: 2 2] Your function would return the number 8

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

Current Trends In Database Technology Edbt 2004 Workshops Edbt 2004 Workshops Phd Datax Pim P2panddb And Clustweb Heraklion Crete Greece March 2004 Revised Selected Papers Lncs 3268

Authors: Wolfgang Lindner ,Marco Mesiti ,Can Turker ,Yannis Tzitzikas ,Athena Vakali

2005th Edition

3540233059, 978-3540233053

More Books

Students also viewed these Databases questions