1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
RUDIKE [14]
3 years ago
10

[Submit on zyLabs] Please write a function with one input, a matrix, and one output, a matrix of the same size. The output matri

x should be the input matrix mirrored on the vertical axis. For instance, theinput:[123456789]Would become: [321654987]And the input:[112221112212]Would become:[221112221121]Note that this functions slightly differently for inputs with odd and even numbers of columns. For an odd number of columns, your centermost column stays the same. For an even number of columns, all columns are moved in the resulting output. You can use the function[yDim, xDim]

Computers and Technology
1 answer:
adoni [48]3 years ago
8 0

Answer:

See explaination for the details.

Explanation:

% Matlab file calculateMirrorMatrix.m

% Matlab function to return a matrix which should be input matrix mirrored

% on the vertical axis

% input is a matrix

% output is a matrix of same size as input matrix

function [mirrorMatrix] = calculateMirrorMatrix(inputMatrix)

mirrorMatrix = zeros(size(inputMatrix)); % create output matrix mirrorMatrix of same size as inputMatrix

fprintf('\n Input Matrix :\n');

disp(inputMatrix); % display the input matrix

[row,col] = size(inputMatrix); % row, col contains number of rows and columns of the inputMatrix

% loop to find the matrix which should be input matrix mirrored

for i = 1:row

mirrorIndex =1;

for j = col:-1:1

mirrorMatrix(i,mirrorIndex)=inputMatrix(i,j);

mirrorIndex=mirrorIndex + 1;

end

end

end

% end of matlab function

Please kindly check attachment for its output.

You might be interested in
Is Filmora 9 or Final Cut Pro Better for personal use?
padilas [110]
Final Cut Pro is better for personal use
3 0
3 years ago
What kind of electronic communication might commonly be affected by citizen journalism?
grigory [225]

Answer: Don't got three explanations don't know a lot but here.

Explanation:

"Citizen journalists cover crisis events using camera cell phones and digital cameras and then either publish their accounts on the Web, or exchange images and accounts through informal networks. The result can be news in real-time that is more local and informative."

6 0
3 years ago
Suppose you have a 12-hour clock on a very fancy chair (noon is 12 PM and midnight is 12 AM). Write a C++ program that reads in
agasfer [191]

Answer:

#include<iostream>

#include<cmath>

#include <ctime>

using namespace std;

int main()

{

       time_t t = time(NULL);

tm* timePtr = localtime(&t);

cout << "seconds= " << (timePtr->tm_sec) << endl;

cout << "minutes = " << (timePtr->tm_min) << endl;

cout << "hours = " << (timePtr->tm_hour) << endl;

cout << "day of month = " << (timePtr->tm_mday) << endl;

cout << "month of year = " << (timePtr->tm_mon)+1 << endl;

cout << "year = " << (timePtr->tm_year)+1900 << endl;

cout << "weekday = " << (timePtr->tm_wday )<< endl;

cout << "day of year = " << (timePtr->tm_yday )<< endl;

cout << "daylight savings = " <<(timePtr->tm_isdst )<< endl;

       cout << endl;

       cout << endl;

       cout << "Date     " <<(timePtr->tm_mday)<<"/"<< (timePtr->tm_mon)+1 <<"/"<< (timePtr->tm_year)+1900<< endl;

       cout << "Time     " << (timePtr->tm_hour)<<":"<< (timePtr->tm_min)<<":"<< (timePtr->tm_sec) << endl;  

   return 0;

}

Explanation:

4 0
3 years ago
What are the objects in object-oriented programming language?
VMariaS [17]

Answer:

An object is an abstract data type with the addition of polymorphism and inheritance. Rather than structure programs as code and data, an object-oriented system integrates the two using the concept of an "object". An object has state (data) and behavior (code). Objects can correspond to things found in the real world.

hope it helps ya mate.

5 0
3 years ago
Genres are useful for many reaseons. What are some explanations you can think of for how genres can be useful to players, game d
elena-14-01-66 [18.8K]
  • Genres are used in Readers as well as writers.
  • By using genre patterns in writers it has been accepted by readers for accomplishing their purposes.
  • Genres allow both writers and readers to establish a working relationship between each other.
  • Both writers and readers are required for gamers and game publishers.
  • So Genres are very useful to them.
7 0
3 years ago
Other questions:
  • Every chart has a corresponding ____ that contains the numerical data displayed by the chart.
    6·1 answer
  • 5 provisions of computer ethics
    6·1 answer
  • A ____ is a battery-operated power source directly attached to one or more devices and to a power supply (such as a wall outlet)
    14·1 answer
  • Which of the following is the most significant outcome of the formation of the SMPTE?
    6·2 answers
  • In 2-3 sentences, explain to another student why shortcuts are beneficial. Include details about shortcuts that you have used.
    10·2 answers
  • Write a algorithm to attend birthday party​
    8·2 answers
  • If I was to sort the months of the year in ASCENDING order alphabetically, which
    11·1 answer
  • Mrs. Sims polled her students about which social media app they use most. Which type of chart would best display this data?
    9·1 answer
  • Why it is not recommended to add sound effect on slide transition? Write at least two reasons.​
    6·1 answer
  • A ____ attack is much more substantial than a dos attack because of the use of multiple systems to simultaneously attack a singl
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!