10/31/2022 0 Comments Gnu octave icon![]() ![]() To overlay one plot on top of other, provided we are plotting both the sin and cos against t, we do the following, plot(t,y1) If you have typed it into your octave CLI, you obtain these graphs in separate graphs. Now we can plot using this simple command, plot(t,y1) plot(t,y2) To generate a sin and cos function we do the following, y1=sin(2*pi*4*t) If we want to load the axis with the sin or cos function against a standard rising value say a ‘t’ variable then we do the following, t= Octave, in general, has multiple utilities associated with the plot . We usually make use of plots against given data-sets to test the consistency of the created algorithm over the large range of data. To access the data in the matrix, we follow normal indices convention like the following v(1,1) /*Accesses first element-> Indexing starts at 1 not 0, get your mind out of the nerd bucket -_-*/ Plotting Data txt (Human Readable–>Meh – _ -), we run the following command save YourFileName.mat a Typing the whos command again shows the newly created variable a with (1*15) dimensions. The aforementioned command saves row values 1 through 15 in the newly created variable a. To save the values in a custom variable say a, we do the following a = me_dat(1:15) GNU OCTAVE ICON HOW TOOnce we have loaded the data file, we now learn how to save it and then later transfer to another file. ![]() Whos command gives a more detailed view). You can find me_dat in the variables stored in octave.(Quick Tip: We can check on existing variables using who / whos commands. Now to load that data through octave I would use the load command. To actually load the data, we choose a sample dat file which you can find here. Once we have the file, we go to that location in our octave CLI. So we will look into playing with data, categorizing them, plotting and much more. This post will be all about DATA!!! Ooooh, that felt good. While MATLAB serves the purpose well, it comes at a price, so we do what we always do and go Open-Source with Octave. Usually, what we can do using a high-level language like MATLAB or octave we can get it done with NumPy – python as well, but like I said, to save time we run it through octave first. The GNU Octave is a high-level programming language, that essentially does all the numerical grunt work, enabling programmers to focus on developing more and more algorithms to add to the already huge and growing database of machine learning code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |