Here I will post my sample code corresponding to the running [contest on linear transformation](https://steemit.com/steemstem/@dexterdev/linear-transformations-a-20-sbd-coding-contest-announcement). ``` clear %clear all variables from matlab memory workspace close all % close all figure windows (like previous plots) clc % clear the screen %% This section just creates a square 2D mesh of vectors [X Y] = meshgrid(-10:1:10); % coordinates for vector positions VX = X; % X,Y components of vector VY = Y; quiver(X, Y, VX, VY, 2) title('Input: The 2D space') axis square %% reshaping the vectors for linear transformation YY=reshape(VY,[1 21*21]); XX=reshape(VX,[1 21*21]); XY=[XX ;YY]; A=[1 2;-0.5 1]; % Our transformation matrix A XY_t=A*XY; % linear transform operation %% This section just creates a "transformed" 2D mesh of vectors X_t=reshape(XY_t(1,:),[21 21]); Y_t=reshape(XY_t(2,:),[21 21]); figure quiver(X_t, Y_t, VX, VY, 2) axis square title('Output: The transformed 2D space') ``` ***Don't use modified versions of this code as a solution! (A friendly warning.)*** The input and output of the code is given below: ### Input <center></center> ### Output The transformation matrix considered is ***A=*** ``` 1 2 -0.5 1 ``` <center></center> ## Yes I have copy-pasted my code from github! Don't blame me for plagiarism because I have uploaded it yesterday in [github](https://raw.githubusercontent.com/dexterdev/STEEMIT/master/CONTESTS/linear_transformation.m). I am tagging #steemstem because this contest comes as a part of Linear algebra article I wrote recently. So I don't expect #steemstem vote for this. See those articles below: - [Linear Transformations: A 20 SBD coding contest announcement!](https://steemit.com/steemstem/@dexterdev/linear-transformations-a-20-sbd-coding-contest-announcement) - [Eigen Values and Eigen Vectors: Visually Explained! ](https://steemit.com/steemstem/@dexterdev/eigen-values-and-eigen-vectors-visually-explained) --- ### Join #steemSTEM Join the active science community #steemSTEM at discord: https://discord.gg/BZXkmWw #### And to steemSTEM beginners: You can ask for help in our discord page. There are people ready to help you there. <center>https://steemitimages.com/DQmPtnKZW6cQWBAzpA8yiqTDXSsVH9zEUyxFiek2kGEoA8g/bear.gif</center> <center>gif courtesy: @rocking-dave</center> --- **All images without image sources are my creations :)** ## <center>Follow me @dexterdev</center> --- ____ _______ ______ _________ ____ ______ / _ / __\ \//__ __/ __/ __/ _ / __/ \ |\ | | \| \ \ / / \ | \ | \/| | \| \ | | // | |_/| /_ / \ | | | /_| | |_/| /_| \// \____\____/__/\\ \_/ \____\_/\_\____\____\__/
author | dexterdev |
---|---|
permlink | linear-transformation-contest-sample-code-in-matlab |
category | steemstem |
json_metadata | {"tags":["steemstem","contest","coding-challenge","coding","busy"],"users":["rocking-dave","dexterdev"],"image":["https://i.imgur.com/JpJyGWr.png","https://steemitimages.com/DQmXjtTFdSQnr76QoFo8JDPjXnRrLqwyudFFx3vLgxgeSW3/o.png","https://steemitimages.com/DQmPtnKZW6cQWBAzpA8yiqTDXSsVH9zEUyxFiek2kGEoA8g/bear.gif"],"links":["https://steemit.com/steemstem/@dexterdev/linear-transformations-a-20-sbd-coding-contest-announcement","https://raw.githubusercontent.com/dexterdev/STEEMIT/master/CONTESTS/linear_transformation.m","https://steemit.com/steemstem/@dexterdev/eigen-values-and-eigen-vectors-visually-explained","https://discord.gg/BZXkmWw"],"app":"steemit/0.1","format":"markdown"} |
created | 2018-04-03 14:24:51 |
last_update | 2018-04-03 15:11:15 |
depth | 0 |
children | 2 |
last_payout | 2018-04-10 14:24:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 9.890 HBD |
curator_payout_value | 2.925 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 2,855 |
author_reputation | 17,771,704,061,240 |
root_title | "Linear Transformation Contest: Sample Code in Matlab" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 48,126,856 |
net_rshares | 4,200,787,314,740 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
pharesim | 0 | 77,789,190,511 | 0.02% | ||
lafona-miner | 0 | 105,243,900,737 | 5% | ||
kushed | 0 | 1,546,313,534 | 0.89% | ||
steem-id | 0 | 8,317,822,050 | 0.89% | ||
justtryme90 | 0 | 128,583,964,537 | 5% | ||
anwenbaumeister | 0 | 25,866,089,948 | 0.89% | ||
grandpere | 0 | 12,362,507,550 | 5% | ||
firepower | 0 | 551,949,175,826 | 35% | ||
liberosist | 0 | 8,304,409,835 | 0.89% | ||
ben.zimmerman | 0 | 64,420,251,070 | 100% | ||
timsaid | 0 | 5,319,819,927 | 1% | ||
velourex | 0 | 574,553,729 | 0.89% | ||
lemouth | 0 | 17,059,733,887 | 3.75% | ||
rjbauer85 | 0 | 266,218,255 | 5% | ||
anarchyhasnogods | 0 | 8,313,352,413 | 2.5% | ||
lamouthe | 0 | 1,169,737,994 | 5% | ||
steemedia | 0 | 106,659,501 | 0.89% | ||
meerkat | 0 | 66,908,802,215 | 0.89% | ||
curie | 0 | 42,765,019,626 | 0.89% | ||
cebymaster | 0 | 132,907,944 | 0.89% | ||
hendrikdegrote | 0 | 516,027,101,501 | 0.97% | ||
steemstem | 0 | 122,780,191,237 | 5% | ||
dashfit | 0 | 114,456,221 | 0.44% | ||
sethroot | 0 | 92,533,508 | 0.08% | ||
cotidiana | 0 | 118,743,874 | 0.89% | ||
foundation | 0 | 437,663,534 | 5% | ||
the-devil | 0 | 538,704,718 | 5% | ||
thevenusproject | 0 | 2,489,941,679 | 5% | ||
dna-replication | 0 | 1,398,041,107 | 5% | ||
steemitboard | 0 | 317,294,176 | 1% | ||
pacokam8 | 0 | 83,139,063 | 0.22% | ||
borislavzlatanov | 0 | 385,845,226 | 5% | ||
michelios | 0 | 1,555,225,105 | 0.17% | ||
jamhuery | 0 | 681,518,186 | 5% | ||
jade56 | 0 | 109,590,856 | 2.5% | ||
oscarcc89 | 0 | 102,007,215 | 0.08% | ||
kryzsec | 0 | 6,755,417,803 | 5% | ||
markangeltrueman | 0 | 331,191,392 | 0.13% | ||
s4s | 0 | 1,357,900,173,138 | 39% | ||
nedspeaks | 0 | 963,889,674 | 5% | ||
fredrikaa | 0 | 11,141,864,750 | 2.5% | ||
galberto | 0 | 288,075,389 | 0.02% | ||
tantawi | 0 | 89,178,938 | 0.89% | ||
robertvogt | 0 | 263,342,956 | 0.89% | ||
dkmathstats | 0 | 24,470,161,411 | 100% | ||
locikll | 0 | 422,305,315 | 1.78% | ||
dber | 0 | 1,172,919,094 | 5% | ||
mahdiyari | 0 | 329,609,129 | 0.26% | ||
aboutyourbiz | 0 | 210,606,490 | 0.89% | ||
dreamien | 0 | 52,219,492 | 0.89% | ||
kerriknox | 0 | 13,683,714,045 | 5% | ||
alexander.alexis | 0 | 439,611,705 | 1.5% | ||
howtostartablog | 0 | 430,159,405 | 0.04% | ||
ertwro | 0 | 1,857,697,498 | 5% | ||
juanjdiaz89 | 0 | 187,446,932 | 5% | ||
nitesh9 | 0 | 1,124,511,955 | 5% | ||
churchboy | 0 | 692,697,043 | 5% | ||
himal | 0 | 346,906,445 | 5% | ||
nitego | 0 | 97,103,073 | 0.26% | ||
abigail-dantes | 0 | 84,861,538,795 | 5% | ||
leczy | 0 | 324,058,737 | 5% | ||
ovij | 0 | 651,571,875 | 5% | ||
joseg | 0 | 77,297,126 | 3% | ||
akeelsingh | 0 | 146,916,592 | 5% | ||
justdentist | 0 | 1,182,280,732 | 2% | ||
somethingburger | 0 | 378,513,453 | 5% | ||
zest | 0 | 3,349,050,711 | 10% | ||
felixrodriguez | 0 | 116,700,673 | 2.5% | ||
tormiwah | 0 | 234,856,938 | 1.5% | ||
gabox | 0 | 172,266,954 | 0.04% | ||
infinitelearning | 0 | 155,396,676 | 2.5% | ||
snowpea | 0 | 142,235,324 | 5% | ||
ksolymosi | 0 | 927,480,914 | 5% | ||
simplifylife | 0 | 754,016,515 | 2.5% | ||
jordanx2 | 0 | 58,448,695 | 0.44% | ||
thatterrioguy | 0 | 74,151,728 | 0.66% | ||
mayowadavid | 0 | 408,576,475 | 2.5% | ||
zeeshan003 | 0 | 106,945,708 | 5% | ||
erodedthoughts | 0 | 329,058,277 | 0.25% | ||
enzor | 0 | 85,436,577 | 2.5% | ||
kieranpearson | 0 | 53,860,553 | 0.44% | ||
kiaazad | 0 | 14,369,533,199 | 40% | ||
carloserp-2000 | 0 | 788,423,632 | 5% | ||
pangoli | 0 | 412,210,255 | 5% | ||
rachelsmantra | 0 | 193,103,174 | 5% | ||
altherion | 0 | 2,061,312,718 | 5% | ||
cryptotradingfr | 0 | 92,029,716 | 1% | ||
gra | 0 | 1,692,660,485 | 5% | ||
katerinaramm | 0 | 12,008,848,010 | 33% | ||
spectrums | 0 | 52,726,454 | 0.89% | ||
physics.benjamin | 0 | 17,122,861,220 | 100% | ||
xanderslee | 0 | 80,249,308 | 0.89% | ||
kenadis | 0 | 1,218,799,888 | 5% | ||
amavi | 0 | 773,556,866 | 1% | ||
robotics101 | 0 | 199,862,659 | 4% | ||
gentleshaid | 0 | 903,327,003 | 5% | ||
musicayfarandula | 0 | 51,164,116 | 10% | ||
sco | 0 | 329,878,848 | 1% | ||
adetola | 0 | 161,301,637 | 5% | ||
dysfunctional | 0 | 217,286,599 | 2.5% | ||
zlatkamrs | 0 | 599,586,609 | 100% | ||
mathowl | 0 | 2,442,438,431 | 100% | ||
hadji | 0 | 218,808,141 | 5% | ||
steemstem-bot | 0 | 3,476,206,987 | 25% | ||
sakura1012 | 0 | 96,663,802 | 5% | ||
scienceangel | 0 | 14,201,729,905 | 100% | ||
mbp | 0 | 810,160,238,920 | 38% | ||
terrylovejoy | 0 | 356,608,846 | 1% | ||
rionpistorius | 0 | 93,202,883 | 2.5% | ||
deutsch-boost | 0 | 350,447,279 | 20% | ||
dexterdev | 0 | 18,244,044,100 | 100% | ||
ugonma | 0 | 65,205,922 | 5% | ||
drkomoo | 0 | 55,575,054 | 5% | ||
aotearoa | 0 | 63,597,136 | 4% | ||
benleemusic | 0 | 1,311,832,347 | 0.04% | ||
vinamra | 0 | 1,099,344,020 | 100% | ||
chimtivers96 | 0 | 61,749,013 | 0.89% | ||
zipporah | 0 | 161,509,402 | 0.17% | ||
positiveninja | 0 | 102,761,480 | 0.44% | ||
pseudojew | 0 | 75,641,784 | 5% | ||
de-stem | 0 | 1,959,218,904 | 5% | ||
niouton | 0 | 128,861,187 | 0.17% | ||
star-vc | 0 | 529,260,843 | 100% | ||
leopatra | 0 | 129,754,563 | 100% |
Congratulations @dexterdev! You have completed some achievement on Steemit and have been rewarded with new badge(s) : [](http://steemitboard.com/@dexterdev) Award for the number of upvotes received Click on any badge to view your own Board of Honor on SteemitBoard. To support your work, I also upvoted your post! For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard) If you no longer want to receive notifications, reply to this comment with the word `STOP` > Upvote this notification to help all Steemit users. Learn why [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)! Do not miss the [last announcement](https://steemit.com/easter/@steemitboard/celebrate-easter-with-steemitboard-the-eggs-opened-and-guess-what-popped-out) from @steemitboard!
author | steemitboard |
---|---|
permlink | steemitboard-notify-dexterdev-20180403t231253000z |
category | steemstem |
json_metadata | {"image":["https://steemitboard.com/img/notifications.png"]} |
created | 2018-04-03 23:12:51 |
last_update | 2018-04-03 23:12:51 |
depth | 1 |
children | 0 |
last_payout | 2018-04-10 23:12:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 911 |
author_reputation | 38,975,615,169,260 |
root_title | "Linear Transformation Contest: Sample Code in Matlab" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 48,197,468 |
net_rshares | 0 |
<center><a href="www.steemit.com/@steemstem"><img src="https://media.discordapp.net/attachments/384404201544876032/405507994583957505/steemSTEM.png"></a><br><table><tr><th> </th><th> </th><th><a href="https://steemit.com/steemstem/@steemstem/helpful-guidelines-for-crafting-steemstem-content">Guidelines</a></th><th><a href="https://steemit.com/steemstem/@steemstem/steemstem-winter-2017-2018-project-update">Project Update</a></th><th> </th><th> </th></tr></table><br><a href="https://steemit.com/steemstem/@steemstem/being-a-member-of-the-steemstem-community"><b>Being A SteemStem Member</b></a></center>
author | steemstem-bot |
---|---|
permlink | re-linear-transformation-contest-sample-code-in-matlab-20180404t235525 |
category | steemstem |
json_metadata | "" |
created | 2018-04-04 23:55:27 |
last_update | 2018-04-04 23:55:27 |
depth | 1 |
children | 0 |
last_payout | 2018-04-11 23:55:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 606 |
author_reputation | 3,811,533,615,496 |
root_title | "Linear Transformation Contest: Sample Code in Matlab" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 48,384,037 |
net_rshares | 0 |