Python Forum
Return values for use outside of function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Return values for use outside of function
#2
your function returns uVector (no need of the brackets, by the way) and you assign the value returned by the function to systemResponse. You must use that name, not uVector (which is local to function scope only, i.e. it doesn't exists outside the function).
By the way, instead of systemResponse you can use uVector, without any problem, if that name is more meaningful, e.g.
uVector = calculateResponse(tvector, f2vector, f3vector)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: Return values for use outside of function - by buran - Apr-13-2020, 07:00 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need to return 2 values from 1 DF that equals another DF cubangt 5 649 Oct-21-2023, 02:45 PM
Last Post: deanhystad
  nested function return MHGhonaim 2 621 Oct-02-2023, 09:21 AM
Last Post: deanhystad
  return next item each time a function is executed User3000 19 2,311 Aug-06-2023, 02:29 PM
Last Post: deanhystad
  function return boolean based on GPIO pin reading caslor 2 1,193 Feb-04-2023, 12:30 PM
Last Post: caslor
  Adding values with reduce() function from the list of tuples kinimod 10 2,677 Jan-24-2023, 08:22 AM
Last Post: perfringo
  [Solved]Return values from npyscreen Extra 2 1,176 Oct-09-2022, 07:19 PM
Last Post: Extra
  Parallelism with return values Plexian 7 1,512 Aug-14-2022, 09:33 AM
Last Post: Plexian
  function accepts infinite parameters and returns a graph with those values edencthompson 0 868 Jun-10-2022, 03:42 PM
Last Post: edencthompson
  please help with classes and return values jamie_01 5 1,805 Jan-17-2022, 02:11 AM
Last Post: menator01
  Need to parse a list of boolean columns inside a list and return true values Python84 4 2,125 Jan-09-2022, 02:39 AM
Last Post: Python84

Forum Jump:

User Panel Messages

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