I have the following data saved from a MATLAB code and they have the following form:
So I have written the following python code that is not working:
Quote:0,0.001,0.002,0.003,0.004,0.005,0.006,0.007,0.008,0.009,0.01,0.011,0.012,0.013,0.014,0.015,0.016,0.017,0.018,..and I am trying to recreate my plot from MATLAB that looks like:
So I have written the following python code that is not working:
XX, YY =[], [] for line in open('RhoMacCormack_sigpt05_cflpt5.txt','r'): values = [float(s) for s in line.split()] XX.append(values[0]) YY.append(values[1]) plt.plot(XX,YY) plt.show()Gives the error:
ValueError: could not convert string to float: '0,0.001,0.002,0.003,0.004...Could someone help me get this working?