Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Langauge: MATLAB Write a function with the header: function Q = myTrigFunction (M) which takes a Matrix M filled with integers and returns a

Programming Langauge: MATLAB

image text in transcribed

Write a function with the header: function Q = myTrigFunction (M) which takes a Matrix M filled with integers and returns a matrix Q such that 0(i,j) = sin (pi/M ( i, j )) + 1 0(i,j) = cos (pi/M ( i, j ) ) -1 if M(i,j) is an odd integer and if M(i,j) is an even integer. You may assume elements of M will be greater than 0. Test Cases: >> A= [3 4; 6 7]; >> R = myTrigFunction(A) 1.8660 0.1340 0.2929 1.4339 >>B=[41 3 5 8 12 16 1 106 9; 2 5 12 3 14 17 33 19 11]; >> S = myTrigFunction (B) 1.0765 1.8660 1.5878 0.0761 0.0341 0.0192 1.0000 0.0004 1.3420 1.0000 1.5878 0.0341 1.8660 0.0251 1.1837 1.0951 1.1646 1.2817

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2016 Riva Del Garda Italy September 19 23 2016 Proceedings Part 3 Lnai 9853

Authors: Bettina Berendt ,Bjorn Bringmann ,Elisa Fromont ,Gemma Garriga ,Pauli Miettinen ,Nikolaj Tatti ,Volker Tresp

1st Edition

3319461303, 978-3319461304

More Books

Students also viewed these Databases questions

Question

Do other psychological syndromes have a place in the courtroom?

Answered: 1 week ago

Question

1. Define and explain culture and its impact on your communication

Answered: 1 week ago