Problema con comando plot para graficar

mi problema esta cuanto en el grafico no aparece la linea que une la variable X con Y1, solo me aparece el asterisco y yo quiero la linea completa
for a = 1 % sin ala
f1 = figure('Name',['comparacion coeficiente Cny -' ala{a}]);
for b = 1:length(alfa);
for v = 1:length(velocidad);
Y1 = -0.00152;
for c = 1:length(beta);
X = deslizamiento;
Y(c) = coeficienteCny.(['velocidad' num2str(velocidad(v))]).(ala{a}).(alfa{b}).(beta{c});
end
if v == 1
subplot(3,1,b)
plot(X,Y,'--vk');
if b == 1
ylabel('ataque nulo');
end
if b == 2
ylabel('ataque 0º');
end
if b == 3
ylabel('ataque 4º');
end
axis([-16 5 -0.003 0]);
grid on
hold on
end
if v == 2
subplot(3,1,b)
plot(X,Y,'--^k');
plot(X,Y1,'b-*');
hold off
end
end
end

4 件のコメント

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2019 年 12 月 6 日
probablemente no te aparece porque es un solo punto, podrías subir tus archivos para ejecutar el código?
Caleb Quirós
Caleb Quirós 2019 年 12 月 6 日
son muy pesados y tienen muchos datos, lo que busco es comparar los datos procesos con lineas horizontales solamente es eso
JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2019 年 12 月 6 日
sin información previa de tus variables se hace difícil ayudarte, pero el comando plot(X,Y1,'b-*'); efectivamente dibuja una línea siempre y cuando X y Y1 sean vectores
Caleb Quirós
Caleb Quirós 2019 年 12 月 6 日
Muchas gracias por tu ayuda. Creo que ahi esta el mi error. Con cada iteracion se relaciona x e y1 por lo que es una variable simple. No se crea un vector. Me parece a mi

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangePower and Energy Systems についてさらに検索

製品

質問済み:

2019 年 12 月 6 日

コメント済み:

2019 年 12 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by