Can anyone help me fix my code?

2 visualizaciones (últimos 30 días)
Mitsos
Mitsos el 19 de En. de 2015
Respondida: dpb el 19 de En. de 2015
Hello everyone,
i have a big problem with my code. I am trying to generate the graph in the attached file and i cannot. I attached my matlab code as well.
The code receives a range of temperature/wavelength values and i want my plot of phase vs temperature to be like sawtooth. If anyone can improve it or has any tips and suggestions for fixing, it is totally acceptable.
Also in my code there is a vector R (reflectance) which i want to plot the graph R vs lamda, for a variety of L, in the same figure with different colors. How i could do that?
<<
>>
Thanks a lot in advance and sorry for such a big text Dimitris

Respuesta aceptada

dpb
dpb el 19 de En. de 2015
For the former, organize the data by column in two commensurately-sized arrays of T, phi. plot will then treat each column as a new line. If there aren't the same number of data points available for each, fill the shorter columns with NaN and plot will ignore those entries. Put all NaN entries at beginning or end of each column to avoid broken lines.
For the latter, after the first call to plot
hold on
plot(secondX,secondY,lineStyleTriplet)
See
doc plot
for details and read thru the linestyle properties section on how to adjust colors, etc., by line handle.

Más respuestas (0)

Categorías

Más información sobre Annotations 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