Symbols: (U)p (B)ack (L)eft (R)ight (F)ront, U' means rotating in counter-clockwise direction, while U means clockwise.
Symbols: (U)p (B)ack (L)eft (R)ight (F)ront, U' means rotating in counter-clockwise direction, while U means clockwise.
Problem: Skype icon not showing on panel tray (top bar) and launcher (left bar)
Affected: Ubuntu 12.04
Cause: installation from .deb
Solution:
sudo apt-get install sni-qt sni-qt:i386 gsettings get com.canonical.Unity.Panel systray-whitelist gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Wine', 'Update-notifier', 'Skype']"
Source:
How do I Get the Skype Status Icon Back on Panel TrayNote: This guide is for Linux.
/usr/lib/scicoslab-gtk-4.4.1/), usesudo cp -r scipad/* /usr/lib/scicoslab-gtk-4.4.1/
The lesson here is that mv command doesn't have -r option, so cp is all right.
sudo scicoslab
genlib("utillib");
Exit and restart scicoslab, and that will be okay.
--> v = zeros(1:20)
To launch the embedded editor, type
--> scipad
One can write a sequence of Scicos instructions and save it as *.sci files. To load such a program into ScicosLab, type
--> exec('foo.sci');
It inherits a Linux style,
--> pwd --> ls --> cd
To clear terminal screen, use either one
--> ctrl+l --> clc
For instance,
function [re,im] = compute(v, f)
re=re+cos(2*%pi*f*v/1000000);
im=im+sin(2*%pi*f*v/1000000);
return [re,im];
endfunction
The return value is a vector [re,im], as you might notice, the Scicos language is C-like but not strong-typed. This function compute takes two params. Notice that the incremental sum is not supported, that is re+=... commits an error. Once loaded into ScicosLab, it works as library functions. You can call it anytime, but after a clear command, it vanishes as all the other customized variables do.
for i=1:20, printf("%d\n",i); end
Notice that no increment of i is needed. It does so automatically at every loop.
i=1;
while i<=20, printf("%d\n",i);i++; end
TBD.
Fourier's building blocks were sine and cosine waves. All the majesty of periodic functions can be constructed by them.
Just a glimpse. A periodic function $f(x)$, with $(-\pi, \pi)$ as its basic periodic unit, can be approached by the sum of an infinite series.
$$a_0 = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x)dx \\ a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)\cos(nx)dx \\ b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)\sin(nx)dx \\ a_0 + \sum_{n=1}^{\infty}(a_n \cos (nx) + b_n \sin (nx))$$
Also a quick glance,
$$\mathcal{F}(f(t))(s) = \int_{-\infty}^{+\infty} f(t)e^{-2\pi i s t} dt$$
A bit into the point. The input of DFT is a finite series of equally-spaced (in time) samples. e.g., f(0), f(0.1), f(0.2), ..., f(2π), and the output is a series of complex numbers encoding the amplitude and phase information, say $\mathcal{F}(0)$, $\mathcal{F}(F_0)$, ..., $\mathcal{F}(-F_0)$. And $F_0$ is the fundamental frequency, which is calculated as
$$F_0 = \frac{1}{N \Delta}$$$\Delta$ is the sample period, in our example it is $0.1$. The x-axis of these numbers are the frequency spaced as in the figure below,
However, the discrete transform is thus performed, $$\mathcal{F}(n) = \sum_{k=0}^{N} f(k) e^{-2\pi i n k/N}$$
The basic calculation unit is a vector or a matrix in ScicosLab. What we get used to is a 1*1 matrix.
--> 0:0.1:4*%pi
Well, the result is stored in the variable ans and the vector will be displayed hereafter. This vector is comprised of float numbers from 0 to 4π with a spacing of 0.1, they are 116 numbers, check this with the function length(). Yes, %pi is the Scicos way of pre-defining some constants. For the logarithmic natural base e, it uses %e. To stop printing results after each command, one can end it with a semi-colon(;).
--> a = 0:0.1:4*%pi;
Variables are type-free when being declared, so the initialization will make the variable a being a vector. Any assignment will change its content and type just like using a brand-new variable. The system preserved variable ans will be updated in the same fashion after executing every command.
--> a = sin(a);
--> plot(a);
This gives you a sine wave of 2 periods.
--> v = dft(a,-1); --> clf(); --> plot(v);
To check the usage of a function or related entries, use
--> apropos fourier --> help dft
To clear the graph/figure, use the function clf(). We see in the new plotting
ScicosLab just drew the real part of frequency components, to compare with the imaginary parts, use
--> plot(imag(v), 'red');
The figure gets re-shaped and we see two spikes again. As a matter of fact, the Fourier transform of sine wave is two dirac functions.
--> browsevar --> clear
The former gives a window of currently being-used variables, and the latter command just destroys them.
The data file temp is lines of float numbers with one at each line.
--> fp = mopen("temp","r");
--> v = mfscanf(-1,fp,"%f");
--> v';