Matrices, functions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Matrices, functions

Egshiglen Bat-Erdene
Hello

I have a quetionabout function on matrices. Its a homework

The question is 

Write a function that applies the function 2(sinx)^2 +1 to every second column of a matrix.

I hope you can help me

Best,

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Matrices, functions

Sebastian Schöps
Egshiglen Bat-Erdene wrote
> I have a quetionabout function on matrices. Its a homework
> The question is
> Write a function that applies the function 2(sinx)^2 +1 to every second
> column of a matrix.

The exercise is quite clear, so what is your actual question about it?
You do not expect us to solve it for you, do you?

Some links that may be useful
* learn how to do element-wise operations
https://www.gnu.org/software/octave/doc/v4.2.1/Arithmetic-Ops.html

* how to index a matrix
https://www.gnu.org/software/octave/doc/v4.2.1/Index-Expressions.html

* find out about trigonometric functions
https://www.gnu.org/software/octave/doc/v4.2.1/Trigonometry.html

Sebastian



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Matrices, functions

Andreas Weber-6
In reply to this post by Egshiglen Bat-Erdene
Am 02.12.2017 um 11:14 schrieb Egshiglen Bat-Erdene:
> Write a function that applies the function 2(sinx)^2 +1 to every second
> column of a matrix.

What have you tried so far (please provide your code) and which specific
question do you have?


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave