Cody

Solution 1695227

Submitted on 18 Dec 2018 by James
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x = 1; eta0=0.01; R=300; f=0.01; g=9.81; x=-500:50:500; y=-500:50:500; [x y]=meshgrid(x,y); vi=(g*eta0)/f*(-2*x/R^2).*exp(-(x.^2+y.^2)/R^2); ui=-(g*eta0)/f*(-2*y/R^2).*exp(-(x.^2+y.^2)/R^2); [u,v]=your_fcn_name(x) assert(isequal(u,ui)&isequal(v,vi))

u = Columns 1 through 18 -0.0004 -0.0007 -0.0011 -0.0017 -0.0025 -0.0034 -0.0043 -0.0053 -0.0061 -0.0066 -0.0068 -0.0066 -0.0061 -0.0053 -0.0043 -0.0034 -0.0025 -0.0017 -0.0006 -0.0011 -0.0017 -0.0027 -0.0038 -0.0052 -0.0066 -0.0081 -0.0093 -0.0101 -0.0103 -0.0101 -0.0093 -0.0081 -0.0066 -0.0052 -0.0038 -0.0027 -0.0009 -0.0016 -0.0025 -0.0038 -0.0054 -0.0074 -0.0094 -0.0115 -0.0132 -0.0143 -0.0147 -0.0143 -0.0132 -0.0115 -0.0094 -0.0074 -0.0054 -0.0038 -0.0012 -0.0021 -0.0033 -0.0050 -0.0072 -0.0098 -0.0125 -0.0152 -0.0175 -0.0190 -0.0196 -0.0190 -0.0175 -0.0152 -0.0125 -0.0098 -0.0072 -0.0050 -0.0015 -0.0025 -0.0041 -0.0062 -0.0089 -0.0120 -0.0154 -0.0187 -0.0215 -0.0234 -0.0241 -0.0234 -0.0215 -0.0187 -0.0154 -0.0120 -0.0089 -0.0062 -0.0017 -0.0029 -0.0046 -0.0070 -0.0100 -0.0136 -0.0174 -0.0212 -0.0244 -0.0265 -0.0272 -0.0265 -0.0244 -0.0212 -0.0174 -0.0136 -0.0100 -0.0070 -0.0017 -0.0029 -0.0047 -0.0072 -0.0103 -0.0140 -0.0179 -0.0218 -0.0250 -0.0272 -0.0280 -0.0272 -0.0250 -0.0218 -0.0179 -0.0140 -0.0103 -0.0072 -0.0016 -0.0027 -0.0043 -0.0065 -0.0094 -0.0127 -0.0163 -0.0198 -0.0228 -0.0248 -0.0255 -0.0248 -0.0228 -0.0198 -0.0163 -0.0127 -0.0094 -0.0065 -0.0012 -0.0021 -0.0033 -0.0050 -0.0072 -0.0097 -0.0125 -0.0152 -0.0175 -0.0190 -0.0195 -0.0190 -0.0175 -0.0152 -0.0125 -0.0097 -0.0072 -0.0050 -0.0007 -0.0011 -0.0018 -0.0027 -0.0039 -0.0053 -0.0068 -0.0083 -0.0095 -0.0103 -0.0106 -0.0103 -0.0095 -0.0083 -0.0068 -0.0053 -0.0039 -0.0027 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0007 0.0011 0.0018 0.0027 0.0039 0.0053 0.0068 0.0083 0.0095 0.0103 0.0106 0.0103 0.0095 0.0083 0.0068 0.0053 0.0039 0.0027 0.0012 0.0021 0.0033 0.0050 0.0072 0.0097 0.0125 0.0152 0.0175 0.0190 0.0195 0.0190 0.0175 0.0152 0.0125 0.0097 0.0072 0.0050 0.0016 0.0027 0.0043 0.0065 0.0094 0.0127 0.0163 0.0198 0.0228 0.0248 0.0255 0.0248 0.0228 0.0198 0.0163 0.0127 0.0094 0.0065 0.0017 0.0029 0.0047 0.0072 0.0103 0.0140 0.0179 0.0218 0.0250 0.0272 0.0280 0.0272 0.0250 0.0218 0.0179 0.0140 0.0103 0.0072 0.0017 0.0029 0.0046 0.0070 0.0100 0.0136 0.0174 0.0212 0.0244 0.0265 0.0272 0.0265 0.0244 0.0212 0.0174 0.0136 0.0100 0.0070 0.0015 0.0025 0.0041 0.0062 0.0089 0.0120 0.0154 0.0187 0.0215 0.0234 0.0241 0.0234 0.0215 0.0187 0.0154 0.0120 0.0089 0.0062 0.0012 0.0021 0.0033 0.0050 0.0072 0.0098 0.0125 0.0152 0.0175 0.0190 0.0196 0.0190 0.0175 0.0152 0.0125 0.0098 0.0072 0.0050 0.0009 0.0016 0.0025 0.0038 0.0054 0.0074 0.0094 0.0115 0.0132 0.0143 0.0147 0.0143 0.0132 0.0115 0.0094 0.0074 0.0054 0.0038 0.0006 0.0011 0.0017 0.0027 0.0038 0.0052 0.0066 0.0081 0.0093 0.0101 0.0103 0.0101 0.0093 0.0081 0.0066 0.0052 0.0038 0.0027 0.0004 0.0007 0.0011 0.0017 0.0025 0.0034 0.0043 0.0053 0.0061 0.0066 0.0068 0.0066 0.0061 0.0053 0.0043 0.0034 0.0025 0.0017 Columns 19 through 21 -0.0011 -0.0007 -0.0004 -0.0017 -0.0011 -0.0006 -0.0025 -0.0016 -0.0009 -0.0033 -0.0021 -0.0012 -0.0041 -0.0025 -0.0015 -0.0046 -0.0029 -0.0017 -0.0047 -0.0029 -0.0017 -0.0043 -0.0027 -0.0016 -0.0033 -0.0021 -0.0012 -0.0018 -0.0011 -0.0007 0 0 0 0.0018 0.0011 0.0007 0.0033 0.0021 0.0012 0.0043 0.0027 0.0016 0.0047 0.0029 0.0017 0.0046 0.0029 0.0017 0.0041 0.0025 0.0015 0.0033 0.0021 0.0012 0.0025 0.0016 0.0009 0.0017 0.0011 0.0006 0.0011 0.0007 0.0004 v = Columns 1 through 18 0.0004 0.0006 0.0009 0.0012 0.0015 0.0017 0.0017 0.0016 0.0012 0.0007 0 -0.0007 -0.0012 -0.0016 -0.0017 -0.0017 -0.0015 -0.0012 0.0007 0.0011 0.0016 0.0021 0.0025 0.0029 0.0029 0.0027 0.0021 0.0011 0 -0.0011 -0.0021 -0.0027 -0.0029 -0.0029 -0.0025 -0.0021 0.0011 0.0017 0.0025 0.0033 0.0041 0.0046 0.0047 0.0043 0.0033 0.0018 0 -0.0018 -0.0033 -0.0043 -0.0047 -0.0046 -0.0041 -0.0033 0.0017 0.0027 0.0038 0.0050 0.0062 0.0070 0.0072 0.0065 0.0050 0.0027 0 -0.0027 -0.0050 -0.0065 -0.0072 -0.0070 -0.0062 -0.0050 0.0025 0.0038 0.0054 0.0072 0.0089 0.0100 0.0103 0.0094 0.0072 0.0039 0 -0.0039 -0.0072 -0.0094 -0.0103 -0.0100 -0.0089 -0.0072 0.0034 0.0052 0.0074 0.0098 0.0120 0.0136 0.0140 0.0127 0.0097 0.0053 0 -0.0053 -0.0097 -0.0127 -0.0140 -0.0136 -0.0120 -0.0098 0.0043 0.0066 0.0094 0.0125 0.0154 0.0174 0.0179 0.0163 0.0125 0.0068 0 -0.0068 -0.0125 -0.0163 -0.0179 -0.0174 -0.0154 -0.0125 0.0053 0.0081 0.0115 0.0152 0.0187 0.0212 0.0218 0.0198 0.0152 0.0083 0 -0.0083 -0.0152 -0.0198 -0.0218 -0.0212 -0.0187 -0.0152 0.0061 0.0093 0.0132 0.0175 0.0215 0.0244 0.0250 0.0228 0.0175 0.0095 0 -0.0095 -0.0175 -0.0228 -0.0250 -0.0244 -0.0215 -0.0175 0.0066 0.0101 0.0143 0.0190 0.0234 0.0265 0.0272 0.0248 0.0190 0.0103 0 -0.0103 -0.0190 -0.0248 -0.0272 -0.0265 -0.0234 -0.0190 0.0068 0.0103 0.0147 0.0196 0.0241 0.0272 0.0280 0.0255 0.0195 0.0106 0 -0.0106 -0.0195 -0.0255 -0.0280 -0.0272 -0.0241 -0.0196 0.0066 0.0101 0.0143 0.0190 0.0234 0.0265 0.0272 0.0248 0.0190 0.0103 0 -0.0103 -0.0190 -0.0248 -0.0272 -0.0265 -0.0234 -0.0190 0.0061 0.0093 0.0132 0.0175 0.0215 0.0244 0.0250 0.0228 0.0175 0.0095 0 -0.0095 -0.0175 -0.0228 -0.0250 -0.0244 -0.0215 -0.0175 0.0053 0.0081 0.0115 0.0152 0.0187 0.0212 0.0218 0.0198 0.0152 0.0083 0 -0.0083 -0.0152 -0.0198 -0.0218 -0.0212 -0.0187 -0.0152 0.0043 0.0066 0.0094 0.0125 0.0154 0.0174 0.0179 0.0163 0.0125 0.0068 0 -0.0068 -0.0125 -0.0163 -0.0179 -0.0174 -0.0154 -0.0125 0.0034 0.0052 0.0074 0.0098 0.0120 0.0136 0.0140 0.0127 0.0097 0.0053 0 -0.0053 -0.0097 -0.0127 -0.0140 -0.0136 -0.0120 -0.0098 0.0025 0.0038 0.0054 0.0072 0.0089 0.0100 0.0103 0.0094 0.0072 0.0039 0 -0.0039 -0.0072 -0.0094 -0.0103 -0.0100 -0.0089 -0.0072 0.0017 0.0027 0.0038 0.0050 0.0062 0.0070 0.0072 0.0065 0.0050 0.0027 0 -0.0027 -0.0050 -0.0065 -0.0072 -0.0070 -0.0062 -0.0050 0.0011 0.0017 0.0025 0.0033 0.0041 0.0046 0.0047 0.0043 0.0033 0.0018 0 -0.0018 -0.0033 -0.0043 -0.0047 -0.0046 -0.0041 -0.0033 0.0007 0.0011 0.0016 0.0021 0.0025 0.0029 0.0029 0.0027 0.0021 0.0011 0 -0.0011 -0.0021 -0.0027 -0.0029 -0.0029 -0.0025 -0.0021 0.0004 0.0006 0.0009 0.0012 0.0015 0.0017 0.0017 0.0016 0.0012 0.0007 0 -0.0007 -0.0012 -0.0016 -0.0017 -0.0017 -0.0015 -0.0012 Columns 19 through 21 -0.0009 -0.0006 -0.0004 -0.0016 -0.0011 -0.0007 -0.0025 -0.0017 -0.0011 -0.0038 -0.0027 -0.0017 -0.0054 -0.0038 -0.0025 -0.0074 -0.0052 -0.0034 -0.0094 -0.0066 -0.0043 -0.0115 -0.0081 -0.0053 -0.0132 -0.0093 -0.0061 -0.0143 -0.0101 -0.0066 -0.0147 -0.0103 -0.0068 -0.0143 -0.0101 -0.0066 -0.0132 -0.0093 -0.0061 -0.0115 -0.0081 -0.0053 -0.0094 -0.0066 -0.0043 -0.0074 -0.0052 -0.0034 -0.0054 -0.0038 -0.0025 -0.0038 -0.0027 -0.0017 -0.0025 -0.0017 -0.0011 -0.0016 -0.0011 -0.0007 -0.0009 -0.0006 -0.0004

Suggested Problems

More from this Author27