Borrar filtros
Borrar filtros

2D plot array elements

3 visualizaciones (últimos 30 días)
gorilla3
gorilla3 el 19 de Oct. de 2017
Comentada: gorilla3 el 19 de Oct. de 2017
I'm trying to plot elements from an array of solutions (value of percentage), against a changing parameter ABP. However I only get an empty figure.
valueofPercentage= [1 ... n] ABP=[1 ... n] , where n corresponds to 200 elements.
This is the code:
for s=1:1:200
ABP(P_a_b)=s;
end
for n=length(valueofCBF)
percentage= ((valueofCBF(:,1) - CBF_base)/ CBF_base)*100
valueofPercentage(n)=percentage;
end
for a=length(ABP)
figure(1)
hold on;
plot(ABP(a,:),valueofPercentage(a,:))
end
hold off;
  6 comentarios
Rik
Rik el 19 de Oct. de 2017
Why don't you use plot(ABP,valueCBF) then? If you want to plot individual points one by one, make sure to include a hold on after the first plot and using a format for plot that shows points, like plot(ABP(a),valueCBF(a),'*')
gorilla3
gorilla3 el 19 de Oct. de 2017
Thanks Rik!

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by