This repository was archived by the owner on Jul 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -407,8 +407,8 @@ class NonLinearDemandSupplyGraph extends Graph {
407407 f2Shadow = function ( x ) {
408408 return alpha *
409409 ( me . options . gCobbDouglasAInitial *
410- me . options . gCobbDouglasKInitial ** ( alpha - 1 ) ) *
411- ( x ** ( 1 - alpha ) ) ;
410+ x ** ( alpha - 1 ) ) *
411+ ( me . options . gCobbDouglasKInitial ** ( 1 - alpha ) ) ;
412412 } ;
413413 }
414414
@@ -467,8 +467,8 @@ class NonLinearDemandSupplyGraph extends Graph {
467467 f = function ( x ) {
468468 return alpha *
469469 ( me . options . gCobbDouglasA *
470- me . options . gCobbDouglasK ** ( alpha - 1 ) ) *
471- ( x ** ( 1 - alpha ) ) ;
470+ x ** ( alpha - 1 ) ) *
471+ ( me . options . gCobbDouglasK ** ( 1 - alpha ) ) ;
472472 } ;
473473 }
474474
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export default class NonLinearDemandSupplyEditor extends React.Component {
1717 }
1818 render ( ) {
1919 const func1 = `MP_N = (1 - α)${ this . props . gCobbDouglasAName } ${ this . props . gCobbDouglasKName } ^α N^{-α}` ;
20- const func2 = `MP_${ this . props . gCobbDouglasKName } = α${ this . props . gCobbDouglasAName } ${ this . props . gCobbDouglasKName } ^{α - 1} N^{1 - α}` ;
20+ const func2 = `MP_${ this . props . gCobbDouglasKName } = α${ this . props . gCobbDouglasAName } K ^{α - 1} N^{1 - α}` ;
2121 return (
2222 < div >
2323 { this . props . isInstructor && (
@@ -111,7 +111,9 @@ export default class NonLinearDemandSupplyEditor extends React.Component {
111111 </ div >
112112 < div className = "col-sm-4" >
113113 < label htmlFor = "gCobbDouglasK" >
114- { this . props . isInstructor ? (
114+ { this . props . gFunctionChoice === 1 && 'N' }
115+ { this . props . gFunctionChoice !== 1 &&
116+ ( this . props . isInstructor ? (
115117 < input type = "text"
116118 id = "gCobbDouglasKName"
117119 maxLength = "1"
@@ -122,7 +124,7 @@ export default class NonLinearDemandSupplyEditor extends React.Component {
122124 />
123125 ) : (
124126 this . props . gCobbDouglasKName
125- ) }
127+ ) ) }
126128 </ label >
127129 < RangeEditor
128130 dataId = "gCobbDouglasK"
You can’t perform that action at this time.
0 commit comments