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

3 vues (au cours des 30 derniers jours)
Jovos
Jovos le 15 Fév 2016
Modifié(e) : Jovos le 16 Fév 2016
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?

Réponse acceptée

the cyclist
the cyclist le 16 Fév 2016
Modifié(e) : the cyclist le 16 Fév 2016
You can use the transpose function. For example, you could have done
y = flip(AdjClose).'
  1 commentaire
Jovos
Jovos le 16 Fév 2016
Modifié(e) : Jovos le 16 Fév 2016
Thank you.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by