Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: how to show the distance between two curves in a graph
Post: RE: how to show the distance between two curves in...

No, I'd like to have this (attachment)
termo General Coding Help 6 7,045 Oct-21-2019, 07:27 AM
    Thread: how to show the distance between two curves in a graph
Post: RE: how to show the distance between two curves in...

Sorry, I didn't explain myself well. My aim is to draw the minimum distance between the points in the plot and not the curves. I'd like to plot the line (length = SEGMENT) which links two points of di...
termo General Coding Help 6 7,045 Oct-18-2019, 11:58 AM
    Thread: how to show the distance between two curves in a graph
Post: how to show the distance between two curves in a g...

I have these two curves. How could I plot a segment (and the number) whitch rapresent the distance between them (5 in this case) in the same graph? import matplotlib.pyplot as plt X_ev = [0, 1, 2, 3...
termo General Coding Help 6 7,045 Oct-18-2019, 09:19 AM
    Thread: Problem in creating a vector
Post: RE: Problem in creating a vector

This is the Matlab cycle that I'm trying to reproduce: j = 1; while j < max(length(H_ev_hf_vec),length(H_ev_wf_vec))-1 Q_ev_hf = m_hf*(H_ev_hf_vec(j+1)-H_ev_hf_vec(j)); ...
termo General Coding Help 11 3,943 Oct-10-2019, 08:41 AM
    Thread: Problem in creating a vector
Post: RE: Problem in creating a vector

Why in your example x = [1,2,3] for j in range(2): print(x) x = [x[0:j], x[j] + 5.0 / 2.5, x[j+1:]]the second output is not "[[1], 3.0, [2, 3]]"? The first number it should write is 1. Is th...
termo General Coding Help 11 3,943 Oct-03-2019, 09:23 AM
    Thread: Problem in creating a vector
Post: RE: Problem in creating a vector

self.Q_ev_wf and self.m_hf are both float self.H_ev_hf_vec[j] is a numpy.float64 But the probem remains also if I delete + self.Q_ev_wf / self.m_hf
termo General Coding Help 11 3,943 Oct-02-2019, 01:51 PM
    Thread: Problem in creating a vector
Post: RE: Problem in creating a vector

Thank you for the suggestion, I'll study numpy more. But now the problem is the line self.H_ev_hf_vec = [self.H_ev_hf_vec[0:j], self.H_ev_hf_vec[j] + self.Q_ev_wf / self.m_hf, self.H_ev_hf_vec[j+1:len...
termo General Coding Help 11 3,943 Oct-02-2019, 09:02 AM
    Thread: Problem in creating a vector
Post: RE: Problem in creating a vector

This is the code (sorry for the crazy notation): self.H_ev_hf_vec = [self.H_ev_ex_l_hf, self.H_ev_su_v_hf] self.H_ev_wf_vec = [self.H_ev_su_l_wf, self.H_ev_ex_l_wf, self.H_ev_su...
termo General Coding Help 11 3,943 Oct-02-2019, 07:38 AM
    Thread: Problem in creating a vector
Post: Problem in creating a vector

I need to create a vector A_vec. The code line is: self.A_vec = [self.B[0:j], self.B[j] + self.C / self.D, self.B[j+1:len(self.E)]]and the error is: "unsupported operand type(s) for -: 'float' and 'l...
termo General Coding Help 11 3,943 Oct-01-2019, 03:38 PM
    Thread: How to import the name of the fluid in CoolProp from an yml file
Post: How to import the name of the fluid in CoolProp fr...

Hello! I have a file with this class class AAA: def __init__(self,data): #self.fluid = data['fluid'] self.H_p = data['H_p'] self.P_p = data['P_p'] def Calculate...
termo General Coding Help 0 1,832 Sep-26-2019, 01:32 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020