error using Polyfit, X and Y vectors must be the same size

3 visualizzazioni (ultimi 30 giorni)
plot(flip(AdjClose))
y = flip(AdjClose)
x = 1:503;
polyfit(y,x,0)
x is a 503*1 double and y is a 1*503 double. I wonder how can I make them the same size?

Risposta accettata

the cyclist
the cyclist il 16 Feb 2016
Modificato: the cyclist il 16 Feb 2016
You can use the transpose function. For example, you could have done
y = flip(AdjClose).'

Più risposte (0)

Categorie

Scopri di più su Images in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by