Skip to content

Instantly share code, notes, and snippets.

@arsenovic
Created May 6, 2014 12:03
Show Gist options
  • Save arsenovic/11559972 to your computer and use it in GitHub Desktop.
Save arsenovic/11559972 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": "",
"signature": "sha256:e6d7de615408a8059c4d0661ccee68c736936401e162663837e72d5293db0ad4"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"import skrf as rf\n",
"from numpy import *\n",
"\n",
"freq = rf.Frequency.from_f([1,2],'khz')\n",
"ntwk = rf.Network(frequency = freq,\n",
" s = ones(2), # these are just for temp\n",
" z0=50 )\n",
"\n",
"z = array([1+1j,5+3j]).reshape(2,1,1) # make z of shape fxnxn\n",
"ntwk.z=z\n",
"\n",
"ntwk.z"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 27,
"text": [
"array([[[ 1.+1.j]],\n",
"\n",
" [[ 5.+3.j]]])"
]
}
],
"prompt_number": 27
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"ntwk.f"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 29,
"text": [
"array([ 1000., 2000.])"
]
}
],
"prompt_number": 29
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"ntwk.z0"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 30,
"text": [
"array([[ 50.+0.j],\n",
" [ 50.+0.j]])"
]
}
],
"prompt_number": 30
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment