fourier functions form an orthonormal set

[[concept]]

Topics

const fieldName = "theme"; // Your field with links
const oldPrefix = "Thoughts/01 Themes/";
const newPrefix = "Digital Garden/Topics/";
 
const relatedLinks = dv.current()[fieldName];
 
if (Array.isArray(relatedLinks)) {
    // Map over the links, replace the path, and output only clickable links
    dv.el("span",
        relatedLinks
            .map(link => {
                if (link && link.path) {
                    let newPath = link.path.startsWith(oldPrefix)
                        ? link.path.replace(oldPrefix, newPrefix)
                        : link.path;
                    return dv.fileLink(newPath);
                }
            })
            .filter(Boolean).join(", ") 
	// Remove any undefined/null items
    );
} else {
    dv.el(dv.current().theme);
}
 
 

Proposition

The subset of functions is an orthonormal subset of

NOTE

if we don’t like working with complex exponentials we can use And work out everything we need.

Proof

Note that

\langle e^{inx}, e^{imx} \rangle &= \int _{-\pi}^\pi e^{inx} \overline{e^{imx}} \, dx \\ &=\int _{-\pi}^\pi e^{i(n-m)x} \, dx \\ &= \begin{cases} 2\pi, & m=n \\ \frac{1}{i(n-m)} e^{i(n-m)x} \bigg{|}_{-\pi}^\pi=0 & m \neq n \end{cases} \end{align}$$ Since the exponential is periodic in $2\pi$. Normalizing by $2\pi$ yields $$\left\langle \frac{e^{inx}}{\sqrt{ 2\pi }} ,\frac{e^{imx}}{\sqrt{ 2\pi }} \right \rangle =\begin{cases} 1 & m=n \\ 0 & m \neq n \end{cases}$$ Giving us our orthonormal set.

References

References

See Also

Mentions

Mentions

const modules = await cJS()
 
const COLUMNS = [  
	{ id: "Name", value: page => page.$link },  
	{ id: "Last Modified", value: page => modules.dateTime.getLastMod(page) },
];  
  
return function View() {  
	const current = dc.useCurrentFile();
// Selecting `#game` pages, for example. 
	let queryString = `@page and linksto(${current.$link})`;
	let pages = dc.useQuery(queryString);
	
	// check types
	pages = pages.filter( (p) => !modules.typeCheck.checkAll(p, current) ).sort()
	
	
	return <dc.Table columns={COLUMNS} rows={pages} paging={20}/>;  
}  
const { dateTime } = await cJS()
 
return function View() {
	const file = dc.useCurrentFile();
	return <p class="dv-modified">Created {dateTime.getCreated(file)}     ֍     Last Modified {dateTime.getLastMod(file)}</p>
}