Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

replicating front-page example

Aperta
#31 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
julia

Direzione di ricerca

Start by running the front-page script with the listed Julia packages and compare its plot with the attached results. Trace how Fun(f, B, D) and expansion(B, F_.coefficients) represent the Fourier extension, then confirm that the corrected example reproduces the front-page plot.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi!

First of all: Thanks a lot for making your code available :)

I want to implement 1D Fourier-extension of some functions and came across this library last week. I did a fresh install of Julia and the FrameFun, BasisFunctions and DomainSets packages. The first thing I did was to run the example code from the front-page (I run it as a script from the command-line):

gr();

B = Fourier(61) → -1..1
D = -0.5..0.5
f = x->x
F = Fun(f,B,D)
                                                                                                                                                                    
plot(F,layout = 2)

p = plot!(F,f,subplot=2)
display(p)
readline()

However, contrary to the plot on the front-page, the resulting function is only plotted in the inner interval, see figure attached.
frontpage_code_result

I did the following to get the approximation on the whole interval:

gr();

B = Fourier(61) → -1..1
D = -0.5..0.5
f = x->x
F_ = Fun(f, B, D)
F = expansion(B, F_.coefficients)

plot(F,layout = 2)
p = plot!(F,f,subplot=2)
display(p)
readline()

with the result
frontpage_code_adapted_result

This looks better, but it is not the same result as I see on the front-page.

What do I need to change?

Lingua principale
Julia
Stelle
25
Fork
7
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.