I would appreciate it if someone could help me plot a figure similar to the following picture. I want to draw the fundamental signal along with a few first harmonics using pgfplots.
The following time-frequency correspondence illustration is in .    Also a gif animation version (if the animation doesn't show, please open the following image in a new window):    This picture has so much explanatory power, and I would like to replicate it in TikZ for future use.  Here is what I came up with:  \documentclass{minimal} \usepackage{tikz}  \begin{document} \begin{tikzpicture} [x={(1cm,0.5cm)},z={(0cm,0.5cm)},y={(1cm,-0.2cm)}] \draw[-&gt;,thick,blue!90] (0,6.5,0) -- (6.2,6.5,0) node[right] {Frequency}; \draw[-&gt;,thick,red!90] (0,0,0) -- (0,6.5,0) node[below] {Time}; \draw[-&gt;,thick] (0,0,0) -- (0,0,2) node[above] {Magnitude}; \foreach \x in {0.5,1.5,2.5,3.5,4.5,5.5}{   \draw[blue!50] (\x,0,0)   \foreach \y in {0,0.02,...,6.28}{     -- ({\x},{\y},{sin(\x*\y*(157))/sqrt(2*\x)})   };   \draw[blue!90, thick] (\x,6.5,0) -- (\x,6.5,1/\x); }  \end{tikzpicture} \end{document}   This is the output so far.    I have two questions:   How to produce that red superposed sine wave of all the blue sine waves? I don't know if there is a sum function or I have to use loop yet again? How to make the camera projection in TikZ more similar to the perspective in that wikipedia illustration?   Any suggestion and tweaking of the parameters I used in the sample drawing are welcome as well.  Thanks in advance!    Update 1:  Here is a new version using tikz, more readable than the first one. Yet the superposition of the sine waves are done manually...I still don't know how to use foreach to produce a sum.  \begin{tikzpicture}[x={(1cm,0.5cm)},z={(0cm,0.5cm)},y={(1cm,-0.2cm)}] \draw[-&gt;,thick,black!70] (0,6.5,0) -- (6.2,6.5,0) node[right] {Frequency}; \draw[-&gt;,thick,black!70] (0,0,0) -- (0,6.5,0) node[below right] {Time}; \draw[-&gt;,thick] (0,0,0) -- (0,0,2) node[above] {Magnitude}; \foreach \y in {0.5,1.5,...,5.5}{ \draw [cyan!50, domain=0:2*pi,samples=200,smooth]   plot (\y,\x, {sin(4*\y*\x r)/\y }); \draw[blue, ultra thick] (\y,6.5,0) -- (\y,6.5,1/\y); } \draw [red, thick, domain=0:2*pi,samples=200,smooth]  plot (0,\x, {sin(4*0.5*\x r)/0.5 + sin(4*1.5*\x r)/1.5 + sin(4*2.5*\x r)/2.5 + sin(4*3.5*\x r)/3.5 + sin(4*4.5*\x r)/4.5 + sin(4*5.5*\x r)/5.5} ); \end{tikzpicture}   The result is as follows:
What is the command to open the shutdown dialog? How to remove wine completely How can I remove the wine folder and all the applications in that folder?  I've tried via synaptic but it keeps showing up in the application menu. Current code is:  \begin{enumerate}[label=LEVEL \arabic{*},leftmargin=*]     \item Description of Level 1 \quad L1 \\ \emph{more text}     \item Description of Level 2 \quad L2 \\ \emph{more text}  \end{enumerate}   but the \quad does not align L1 and L2 uniformly vertically. I want to replace \quad with a tab but the tabbing environment does not allow mixing with an enumerate! I'm having trouble understanding the ROC curve.  Is there any advantage / improvement in area under the ROC curve if I build different models from each unique subset of the training set and use it to produce a probability? For example, if $y$ has values of $\{a, a, a, a, b, b, b, b\}$, and I build model $A$ by using $a$ from 1st-4th values of $y$ and 8th-9th values of $y$ and build model $B$ by using remained train data. Finally, generate probability. Any thoughts / comments will be much appreciated.   Here is r code for better explanation for my question:  Y    = factor(0,0,0,0,1,1,1,1) X    = matirx(rnorm(16,8,2)) ind  = c(1,4,8,9) ind2 = -ind  mod_A    = rpart(Y[ind]~X[ind,]) mod_B    = rpart(Y[-ind]~X[-ind,]) mod_full = rpart(Y~X)  pred = numeric(8) pred_combine[ind]  = predict(mod_A,type='prob') pred_combine[-ind] = predict(mod_B,type='prob') pred_full          = predict(mod_full, type='prob')   So my question is, area under ROC curve of pred_combine vs pred_full. Clearing NSUserDefaults I'm using +[NSUserDefaults standardUserDefaults] to store application settings. This consists of roughly a dozen string values. Is it possible to delete these values permanently instead of just setting them to a default value? Picking random points in the volume of sphere with uniform probability How would one throw an unwilling creature? My bugbear barbarian, who can lift about double the weight of a wolf, wanted to throw the wolf at a second wolf. How would we go about doing that given existing rules options? What is the best way to flatten a linked list with lists as values? GParted can't resize partition, but unallocated partition is available How is hotness score calculated at larger sites? To start with, I am aware that hot questions from larger sites are somehow "penalized" and :     This is designed to ensure that a single site doesn't dominate the list, and that users see a good sampling of questions that are likely to interest them throughout the network...   I would like to understand how is hotness score really calculated at these sites. The reason why I ask is that per my observations, this seems to be quite different than is documented in the . Specifically, I would like to understand the difference in the impact of answer(s) score and aging factor.  Regarding impact of answers score, my observations of hot questions from smaller sites appear to be in agreement with known formula: (MIN(AnswerCount, 10) * QScore) / 5 + AnswerScore. For example, a question with low score (+1, +2) can get into hot list if it has got answer(s) with sufficiently high score.  At larger sites, this doesn't seem to be the case. Say, it looks like Stack Overflow questions just don't enter hot list until they reach certain score (+6,+7), no matter how many answers are there and how high is their score.  Does system simply totally ignore answers until question reaches certain score?  Another thing I noticed is that questions seem to age away from the hot list 2-3 times faster than ones from smaller sites (having comparable question and answers scores). Granted, this is harder to track and I am not yet sure if I figured that correctly. Do larger sites questions age away faster than those from smaller sites?    For those interested, here is a (partial) list of example questions I studied before asking this: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , .  Although above examples are only from Stack Overflow, my question isn't (I only used it as an example of a large site in my studies). I would like to understand if hot questions from other larger sites are handled in a similar way. Hyperspace travel is a norm in Star Wars universe. Even small ships have that capability and without this capability galactic-scale economy isn't possible.  My educated estimates say that at any point of time at least billions of ships are in hyperspace across the galaxy. Now, talk about economic hubs like Coruscant during Clone Wars Era. The number of ships arriving here should be enormous. Millions in an hour? If one person small ship can have warping capability, then the number can exceed even billions in a peak hour. You can go shopping on a neighbor planet five times a day or you can live on a cheap planet even if you have a job on Coruscant (there are public transport cabs featured in Rebels TV show in case you aren't rich enough to have own ship).  Now, the famous quote:     "Traveling through hyperspace ain't like dusting crops, boy! Without precise calculations we could fly right through a star or bounce too close to a supernova, and that'd end your trip real quick, wouldn't it?"   That's fine. Calculations prevent you from hitting a star, supernova or planet which are already on map, but how does a ship avoid hitting another ship? Provided that number of ships arriving near a planet is that much high, the probability of two ships jumping to the same co-ordinate can't be zero. In fact, the probability should be very very high.  Is there a central body which controls the traffic by coordinating the hyperspace calculations of different ships? This seems unlikely because everyone seems to go anywhere they want while maintaining the destination privacy (there are countless examples). Or, is there really a traffic control body and those who travel privately actually gamble? Is there any other protocol if not traffic control body?  Has the canon ever addressed it? What about Legends? Forbid links to open new tabs in Google Chrome I know that it does consider ' ' as NULL, but that doesn't do much to tell me why this is the case.  As I understand the SQL specifications, ' ' is not the same as NULL -- one is a valid datum, and the other is indicating the absence of that same information.  Feel free to speculate, but please indicate if that's the case.  If there's anyone from Oracle who can comment on it, that'd be fantastic! Does throwing a watch into the air cause it to gain or lose time? Suppose I'm on a non rotating planet. I have two identical, perfect watches. I synchronize them. Then I throw one of them into the air and catch it. Does the one I throw into the air gain or lose time with respect to the one I was holding? How can I include the cursor in the screenshots created when PrtScr is pressed? I have a file: Base.h  class Base; class DerivedA : public Base; class DerivedB : public Base;  /*etc...*/   and another file: BaseFactory.h  #include "Base.h"  class BaseFactory { public:   BaseFactory(const string &amp;sClassName){msClassName = sClassName;};    Base * Create()   {     if(msClassName == "DerivedA")     {       return new DerivedA();     }     else if(msClassName == "DerivedB")     {       return new DerivedB();     }     else if(/*etc...*/)     {       /*etc...*/     }   }; private:   string msClassName; };  /*etc.*/   Is there a way to somehow convert this string to an actual type (class), so that BaseFactory wouldn't have to know all the possible Derived classes, and have if() for each one of them? Can I produce a class from this string?   I think this can be done in C# through Reflection. Is there something similar in C++? Can't SSH in as root I'm using the default installation of openssh-server for my Ubuntu 14.04 server. I can connect through the console as root like normal, with my username and password. When I try to SSH with the same username/password, however, I repeatedly get Access Denied errors. /var/log/auth.log reports Failed password for root from &lt;ip address&gt; port &lt;port&gt; ssh2, but I'm entering the correct password.  Why can't I connect to the server via SSH, even though the username and password ARE correct? Using Virtual Box, how can I install an OS to a secondary, physical disk, and boot it in both (at separate times) Virtual Box, and as a typical secondary OS install? How do I get an array of repeated characters from a string using LINQ? Showing just color ramp in legend without values