Can anyone help me fix my code?

2 ビュー (過去 30 日間)
Mitsos
Mitsos 2015 年 1 月 19 日
回答済み: dpb 2015 年 1 月 19 日
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

採用された回答

dpb
dpb 2015 年 1 月 19 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by