Plot function with time step
Mostra commenti meno recenti
Hello, even if this question was posed in a similar way, I couldn't apply it to my issue, also given the fact I'm very new.
However, I got a set of values (.txt format: A= 4063x1). Thus the y-values are provided, I'd name them y = A{:,1}; Unfortunaly x values are missing, it's just being said time step = 0.000999. That's what is bothering me: how am I generating my line of x-values? It'd be most kind if you'd solve that trivial thing for me. Thx in advance.
Risposta accettata
Più risposte (1)
Steven Lord
il 5 Giu 2020
A slightly different way to create that vector would be to compute integer multiples of the spacing. First I'll make some sample Y data of the correct size:
y = rand(4063, 1);
Now build x.
timestep = 0.000999;
x = (0:numel(y)-1)*timestep;
1 Commento
Niklas Kurz
il 5 Giu 2020
Modificato: Niklas Kurz
il 5 Giu 2020
Categorie
Scopri di più su Labels and Styling in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!