1 Page

Matlab

Course: ENG 341, Fall 2009
School: Iowa State
Rating:
 
 
 
 
 

Word Count: 107

Document Preview

Semi-colon % prevents output of command. % Define a collection of x's & y's. x=0:.05:1;y=0:.05:1; % Define a mesh of points. [xx,yy]=meshgrid(x,y); % Compute the T distribution at each point zz=some function of xx and yy % Plot surface surf(zz); view(120.,30.); %shading interp; %colormap(jet); pause % Compute gradient field [px,py] = gradient(zz,.05,.05); % contours % Plot...

Register Now

Unformatted Document Excerpt

Coursehero >> Iowa >> Iowa State >> ENG 341

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Semi-colon % prevents output of command. % Define a collection of x's & y's. x=0:.05:1;y=0:.05:1; % Define a mesh of points. [xx,yy]=meshgrid(x,y); % Compute the T distribution at each point zz=some function of xx and yy % Plot surface surf(zz); view(120.,30.); %shading interp; %colormap(jet); pause % Compute gradient field [px,py] = gradient(zz,.05,.05); % contours % Plot colormap(jet); contour(x,y,zz,20); % keep contours on the screen & plot vectors hold on; quiver(x,y,px,py,2); hold off; pause % Get gradient at (.5,.5)==> point (11,11) gTp(1)=px(11);...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Iowa State - ENG - 341
Real*4 To,PI,x(21,21),y(21,21),fx(21,21),fy(21,21)Real*4 xx,yy,f(21,21),zInteger j,kTo=0.PI=3.141592654Do k=1,21Do j=1,21 x(j,k)=(j-1)*1.0/(20) xx=x(j,k) y(j,k)=(k-1)*1.0/(20) yy=y(j,k) f(j,k)= your function
Iowa State - ENG - 461
subroutine analyz(uu,ndvv,obj,gcon,nconn)include "./inc/global.h"integer ndvv,nconn,ireal*8 uu(ndvv),gcon(nconn),obj,nsado i=1,ndvvu(i)=ulb(i)+uu(i)*(uub(i)-ulb(i)enddoobj=nsa()do i=1,nconngcon(i)=g(i)enddoreturnend
Iowa State - ENG - 461
function driver()clear all;global u x c ukmin ukmax outputglobal hglobal PI% set the constantsmyinit;% input which control variables & rangesprompt = {'First u Index:','# u values:',. 'Second u Index:','# u values:',. '
Iowa State - ENG - 461
function z = RK4(zn,t)global dtf1=RHS(zn,t);z1=zn+0.5*dt*f1;f2=RHS(z1,t+0.5*dt);z2=zn+0.5*dt*f2;f3=RHS(z2,t+0.5*dt);z3=zn+dt*f3;f4=RHS(z3,t+dt);z=zn+dt*(f1+f4+2*(f2+f3)/6.0;
Iowa State - ENG - 215
Hindman, RichFrom:Longacre, Kenneth D [Kenneth.D.Longacre@USAHQ.UnitedSpaceAlliance.com]Sent:Thursday, September 02, 1999 7:07 PMTo:'Vance, Judy'; 'hindman@iastate.edu'Cc:Brockway, Daniel J; Andrew, Robert L; Longacre, Kenneth DSubject:Recr
Iowa State - ENG - 461
function g=getcons() global u c gg(1)=c(2)+c(1)+c(3)-u(1)-u(2);%slope -1 through center +c(3) in y. gg(2)=u(1)-u(2)+c(4);%slope 1 through y=c(4). g=gg';return;
Iowa State - ENG - 461
function mydriver()clear all;clear global all;global u x c ukmin ukmax% set the constantsmyconstants;% input prompt = {'Input 0|1|2 -> 0=one Nom Soln,1=opt,2=plots:'};title = 'Input For Sample Design Problem';lines= 1;def = {'0'};cell
Iowa State - ENG - 461
function [g geq]=confun(uu) global u c ukmin ukmax u=ukmin+uu.*(ukmax-ukmin); g=getcons; geq=[];return;
Iowa State - ENG - 461
real*8 u(2),ukmin(2),ukmax(2),g(2)real*8 c(4)common/com1/u,ukmin,ukmax,g,c
Iowa State - ENG - 461
function myconstants() global c c=[0,0,1.0,2.0];return;
Iowa State - ENG - 461
subroutine myconstants() include 'global.h' c(1)=0c(2)=0c(3)=1.0c(4)=2.0returnend
Iowa State - ENG - 461
function nsa() include 'global.h'real*8 nsa nsa=(u(1)-c(1)*2+(u(2)-c(2)*2returnend
Iowa State - ENG - 461
function J=nsa(); global u c J=(u(1)-c(1)^1.5+(u(2)-c(2)^1.5;return;
Iowa State - ENG - 461
subroutine getcons(gg) include 'global.h'real*8 gg(2)!slope -1 through center + c(3) in y.gg(1)=c(2)+c(1)+c(3)-u(1)-u(2) !slope 1 through c(4) in y.gg(2)=u(1)-u(2)+c(4)g(1)=gg(1)g(2)=gg(2)end
Iowa State - ENG - 461
function J=objfun(uu) global ukmin ukmax u u=ukmin+uu.*(ukmax-ukmin); J=nsa;return;
Iowa State - ENG - 461
program mydriver!global u x c ukmin ukmaximplicit noneinclude 'global.h'integer whattodo,ni,nj,i,j,k,nvar,ncon,isc(2),iprnt,niter,ierreal*8 uk(2),nsa,ui,uj,perfindx,Jay(11,11),xar(11,11),yar(11,11)real*8 Constraints(11,11,2),u0(2),LB(2),
Iowa State - ENG - 461
subroutine objfun(uu,nuu,J,gg,ngg) include 'global.h'integer i,nuu,nggreal*8 uu(2),J,gg(2)real*8 nsado i=1,2 u(i)=ukmin(i)+uu(i)*(ukmax(i)-ukmin(i)enddo J=nsa()call confun(uu,gg)returnend
Iowa State - ECON - 321
M A O 2006 2 ARIE M 45Note Article April T.UK riginal Regents of 0019-8676 Industrial the AND the IREL 2006 ORA ChangesUniversity of Oxford, onPublishing Ltdin the Relative Wages Blackwell Relations ALBERTO DVILA California of LEP Hispanic MenA No
Iowa State - ECON - 321
TESTING THEORIES OF DISCRIMINATION: EVIDENCE FROM WEAKEST LINK*STEVEN D. LEVITT University of ChicagoAbstractContestant voting behavior on the television game show Weakest Link provides an unusual opportunity to distinguish between taste-based an
Iowa State - ECON - 321
Chutes or Ladders? A Longitudinal Analysis of Immigrant EarningsDarren LubotskyUniversity of Illinois at Urbana-ChampaignI use longitudinal earnings data from Social Security records to study the effect of selective emigration on the measured pr
Iowa State - ECON - 321
Industrial & Labor Relations ReviewVolume 57, Issue 2 2004 Article 6Black Job Applicants and the Hiring Ofcers RaceMichael A. Stoll Stephen Raphael Harry J. HolzerUniversity of California, Los Angeles, University of California, Berkeley, Geo
Iowa State - ECON - 321
Industrial & Labor Relations ReviewVolume 60, Issue 1 2006 Article 3The U.S. Gender Pay Gap in the 1990s: Slowing ConvergenceFrancine D. Blau Lawrence M. Kahn Cornell University, Cornell University,Copyright c 2006 The Berkeley Electronic P
Iowa State - ECON - 520
W.E. Huffman 382A Heady Hall 294-6359Fall 2004 ECON 520 LABOR SUPPLY AND HUMAN CAPITAL OUTLINEI. II.INTRODUCTION LABOR SUPPLY: Farm and Nonfarm Household Decisions A. Choices for Individuals and Married Couples 1. Wage-earning households 2. Agr
Iowa State - ECON - 520
Economics 520 Fall 2004 LABOR SUPPLY AND HUMAN CAPITAL READING LIST I. INTRODUCTION 1.* 2.* 3. 4.* 5. 6.* 7.* 8. 9. 10.Huffman11.* 12.* II.Lord, W.A. "Neoclassical Growth Theory," in Household Dynamics, New York, NY: Oxford University Press 200
Iowa State - ECON - 520
Population, food, and knowledgeD Gale Johnson The American Economic Review; Mar 2000; 90, 1; ABI/INFORM Global pg. 0_6Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.Reproduced with permissio
Iowa State - ECON - 520
Iowa State - ECON - 520
Children and their parents' labor supply: Evidence from exogenous variation .Joshua D Angrist; William N Evans The American Economic Review; Jun 1998; 88, 3; ABI/INFORM Global pg. 450Reproduced with permission of the copyright owner. Further repro
Iowa State - ECON - 520
CHILD CARE COSTS AS A BARRIER TO EMPLOYMENT FOR SINGLE AND MARRIED MOTHERSJean Kimmel*Abstract -Because women typically serve as primary care providers for their children, female labor force participation behavior is likely to be affected signi can
Iowa State - ECON - 520
Econ 520 Labor Supply and Human CapitalFall 2004 Professor Wallace Huffman 382A Heady Hall, 294-6359 whuffman@iastate.edu Office Hours: T, Th, Fri 1-2 and by appointment Class meeting: MWF 2:00, Food Science 2319 A. Course Objective: To provide a f
Iowa State - ECON - 520
Health, Nutrition, and Economic Growth*Robert W Fogel Economic Development and Cultural Change; Apr 2004; 52, 3; ABI/INFORM Global pg. 643Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.Repro
Iowa State - ECON - 520
The market work behavior and wages of women: 1975-94John Pencavel The Journal of Human Resources; Fall 1998; 33, 4; ABI/INFORM Global pg. 771Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.Re
Iowa State - ECON - 520
Wages and participationWelch, Finis Journal of Labor Economics; Jan 1997; 15, 1; ABI/INFORM Global pg. S77Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.Reproduced with permission of the cop
Iowa State - ECON - 520
Testing Intertemporal Substitution, Implicit Contracts, and Hours Restriction Models of the Labor Market Using Micro DataBy JOHN C. HAMANDKEVIN T. REILLY*We present new tests of three theories of the labor market: intertemporal substitution, ho
Iowa State - ECON - 520
THE EFFECTS OF SONS AND DAUGHTERS ON MEN'S LABOR SUPPLY AND WAGESShelly Lundberg and Elaina Rose*Abstract-In this paper, we estimate the effects of children and the differential effects of sons and daughters on men's labor supply and hourly wage ra
Iowa State - ECON - 301
Chapter 12PricingKey issues1. 2. 3. 4. 5. 6.why and how firms price discriminate perfect price discrimination quantity discrimination multimarket price discrimination two-part tariffs tie-in salesNonuniform pricingprices vary across customer
Iowa State - ECON - 301
Chapter 4 Consumer ChoiceIntroduction We have learned supply-demand model, which is used to analyze the behavior of market. Market consists of a lot of consumers and rms. The market demand curve is the sum of all individual demand curves. Similarly,
Iowa State - ECON - 301
Tax IncidenceQuestions 1. What are the effects that a sale tax has on equilibrium price and equilibrium quantity? 2. Who is paying for the entire tax? 3. Do the equilibrium price and quantity depend on whether the tax is assessed on consumers or on
Iowa State - ECON - 301
Iowa State - ECON - 301
Economics 301Spring 2006 Problem set # 8: answers Name:_ 1. If input prices are w = 3 and r = 2, and q = 10KL, what is the least cost input combination required to produce 60 units of output? How would input usage change if output is increased to 24
Iowa State - ECON - 301
Iowa State - ECON - 301
Solution Set # 3Economics 301, Spring 2009 Professor Bunzel Department of Economics Iowa State University1. Barry has the utility function U(x,y) = x + 3y. The price of x is 1 and the price of y is 2 and his income is 8. a) Draw a representative i
Iowa State - ECON - 301
Solution to Problem Set # 2Economics 301, Spring 2009 Professor Bunzel Department of Economics Iowa State University1. Exercise 2.4 from Schotter. (a) We will denote chocolate by C, apple by A and meat by M. Then Geoffrey's preferences are Greedy
Iowa State - ECON - 301
ECON 301 Prof. Bunzel Spring 2009 Solutions to Problemset 1Problem 1 Simplify the following expressions as much as possible by using exponent rules: 1. 2.161/ 4 = 2 161/ 2 + 6251/ 4 = 4 + 5 = 9p 2 p 6 p -3 = p 2+ 6-3 = p 5 c 2 c 6 c -3 c 2+ 6-3 c
Iowa State - ECON - 301
Intermediate Microeconomics 301 Problem Set # 2 Due Wednesday June 29, 2005 1. A new chemical cleaning solution is introduced to the market. Initially, demand is QD = 100 + 2p p2 and supply is QS = 100 + p. Determine the equilibrium price and quanti
Iowa State - ECON - 301
ECNB 314-03, Spring 2003 Intermediate Microeconomics Saint Louis UniversityName:Midterm 2Multiple Choice (4 points each) 1) If Fred's marginal rate of substitution of salad for pizza equals -3, then A) his marginal utility from last pizza is th
Iowa State - ECON - 301
Econ301 (summer 2007) Instructor: Helen YangQuiz 1Date: Jul 5 ' 07PART I: Multiple Choice (5 points each, 75 points in total) 1. In the long run, a monopolistically competitive .rm (a) operates at full capacity. (b) produces at minimum average
Iowa State - ECON - 301
In-class Practice questions for Perfect Competitive Market 0. Assume that a very large number of firms in an industry all have access to the same production technology. The total cost function associated with this technology is TC(q) = 40q 24q2 + 4q
Iowa State - ECON - 301
Iowa State - ECON - 301
ECON 301 Prof. Bunzel Fall 2005MRSHow to calculate the equation for an indifference curve.Calculate the equation for the indifference curve with utility level k. 1. Set U(x,y) = k 2. If you want to draw it or calculate the MRS: Solve for y to ge
Iowa State - ECON - 301
Practice Exam 1 1) write equation for marginal product of capital for each of the following production a) Q = 3K + 2L b) Q = 4K0.5L c) Q = 5K0.5L L 2) Consider the following production function Q = 5KL0.5 L, and assume that capital is fixed at two