MATLAB APPRECIATION THREAD
1
Name:
Anonymous
2011-04-09 0:33
What's your favorite thing about MATLAB / Simulink?
It's hard to choose but for me I'd probably have to go with the powerful matrix math and plot tools.
clear;clc;close all;
k = 5; %highest order fourier series
n = 2^13; %length of vectors
t_n = 2 * pi;
t = linspace(0, t_n, n);
w_0 = 2*pi/t_n; %angular frequency
%function definition
f = sin(t) .* (t < t_n/4);
f = f + 1 .* (t >= t_n/4);
f = f - (cos(t)+1) .* (t >= t_n/2);
f = f .* (t < 3*t_n/4);
t=t';f=f'; %transpose to create column vectors
a=ifft(f); %Fourier series coefficients
p=ones(n,k)*a(1)/2;
for i = 2 : k
for j = 2 : i
p(:,i)=p(:,i) + real(a(j))*cos((j-1)*w_0*t) ...
+ imag(a(j))*sin((j-1)*w_0*t);
end
end
p=2*p;
plot(t,f,'k'); hold on;
plot(t,p,'-.');
xlabel('t');ylabel('f');title('Fourier Series Approximations of f');
legend('f','1^s^t order approximation', ...
'2^n^d order approximation', ...
'3^n^d order approximation', ...
'4^t^h order approximation', ...
'5^t^h order approximation');
%%%%%%%%%%%
clear f;
n = 2 ^ 6;
x = linspace(-3, 3, n);
k = 3; %order of polynomial
%build polynomial
p=x;
for i = 2 : k
r = (x(n)-x(1)) * (rand()-.5);
p = p .* (x - r);
end
%build random function
for i = 1 : n
f(i) = p(i) + 15 * (rand() - .5);
end
q = polyval(polyfit(x,f,k),x); %curve fit random function
figure(2);
hold on;
plot(x,f,'.');plot(x,q,'k');plot(x,p,'m');
xlabel('x');ylabel('y');title('3^r^d order curve fit of random function');
legend('Random Data','Curve Fit of Random Data','Original Polynomial');
fprintf('Max difference between curve fit and original polynomial: %f\n', max(abs(p-q)));
2
Name:
Anonymous
2011-04-09 0:42
ENTERPRISE symbolic toolbox
3
Name:
Anonymous
2011-04-09 1:38
Now let's sit down and wait the ``in Lisp'' guy post his code.
4
Name:
Anonymous
2011-04-09 2:22
5
Name:
Anonymous
2011-04-09 7:24
Best thing about Matlab are the shortcuts of it's IDE
6
Name:
Anonymous
2011-04-09 12:55
There is no redeeming quality.
7
Name:
VIPPER
2011-04-09 15:51
JEWS
8
Name:
VIPPER
2011-04-09 15:53
JEWS
9
Name:
VIPPER
2011-04-09 15:55
JEWS
10
Name:
VIPPER
2011-04-09 15:57
JEWS
11
Name:
Anonymous
2011-04-09 15:58
swej
12
Name:
VIPPER
2011-04-09 15:59
JEWS
13
Name:
test
2011-04-09 16:03
hello
14
Name:
test
2011-04-09 16:04
hello
15
Name:
test
2011-04-09 16:05
hello
16
Name:
test
2011-04-09 16:06
hello
17
Name:
test
2011-04-09 16:06
hello
18
Name:
test
2011-04-09 16:06
hello
19
Name:
test
2011-04-09 16:07
hello
20
Name:
test
2011-04-09 16:08
hello
21
Name:
test
2011-04-09 16:09
hello
22
Name:
test
2011-04-09 16:09
hello
23
Name:
test
2011-04-09 16:10
hello
24
Name:
Anonymous
2011-04-09 19:11
Hello World!
25
Name:
Anonymous
2011-04-10 0:05
How about the incredibly shitty syntax for plot()?
26
Name:
Anonymous
2011-04-10 0:24
>>25
What's wrong with it?
27
Name:
NIGGERFUCK
2011-04-10 1:04
#include <stdio.h>
#define NIGGERFUCK "niggerfuck"
int main() {
printf("Hi %s", NIGGERFUCK);
return 0;}
28
Name:
Anonymous
2011-04-10 16:04
29
Name:
Anonymous
2011-04-12 1:53
30
Name:
Anonymous
2011-04-13 4:29
>>29
fuck you're waifu
your upset
31
Name:
Anonymous
2011-04-13 19:46
>>30
Use appropriate punctuation,
please!
32
Name:
Anonymous
2011-04-16 23:45
33
Name:
Anonymous
2011-04-17 0:27
FUCK YOU
34
Name:
Anonymous
2011-04-17 0:44
>>33
The fuck is your problem?
35
Name:
Anonymous
2011-04-17 0:47
THE FUCK ON
36
Name:
Anonymous
2011-04-23 1:23
I once wrote a quick script in MATLAB and saved it as 33.m
When I ran the code it didn't do anything in the script and just kept printing 33.
Evidently calling 33.m returns 33 in the same way calling a variable returns its value.
37
Name:
Anonymous
2011-04-23 2:47
>>2
'>He needs symbolic math
wwwwwwwwwwwwwwwwwwwwwwww
38
Name:
Anonymous
2011-04-23 22:46
>>37
Holy shit go back to /jp/.
39
Name:
!MILKRIBS
2011-04-23 23:01
40
Name:
Anonymous
2011-04-23 23:32
>>39
Fuck off and die, faggot.
41
Name:
Anonymous
2011-04-23 23:38
I dont know what this shit is I'm not a CS degree.
*Arduino guy talking*
42
Name:
Anonymous
2011-04-24 1:46
>>41
Fuck off and die faggot.
43
Name:
Anonymous
2011-04-24 1:49
>>42 Hey u saidthat to
>>39 too!
you're an asshole. Go eat some cake!
44
Name:
Anonymous
2011-04-24 1:51
"Sim - U - Link"?
Give "Me - A - Break" ?
45
Name:
Anonymous
2011-04-24 2:08
"Sim-U-Link!!!!!" Indeed. SIm you LINK you up to a L(INUX box, beeeeeeeeeeeotch! and when it fails you know you ner'r studied ur homework.
46
Name:
Anonymous
2011-04-24 2:12
kus u dint get *duino.
47
Name:
Anonymous
2011-04-24 2:14
(unless MATLAB runs on duino? doesnt look like it)
48
Name:
Anonymous
2011-04-24 2:19
Oh I guess you can run a MATLAB session on it supposed?
49
Name:
Anonymous
2011-04-24 2:21
the lang still looks goofy. It's not even a "fi" as the endif! :(
50
Name:
Anonymous
2011-04-24 2:21
*for, even. Brakets ne1? wtf is wrong with you kids? what are they teaching you?
51
Name:
Anonymous
2011-04-24 2:43
HAST THOU READ THINE SICP TODAY ??????
52
Name:
Anonymous
2011-04-24 13:33
What the fuck is wrong with this thread?
53
Name:
Anonymous
2011-04-24 13:44
>>52
Some faggot is either a 13 year old idiot or is trying to ruin /prog/ or troll us or some shit.
54
Name:
Anonymous
2011-04-24 14:09
How do I do thisw in JAVA?
55
Name:
Anonymous
2011-04-24 15:44
>>53
Incidentally, the spam has increased since that faggot made that thread on /g/.
56
Name:
Anonymous
2011-04-24 16:54
>>54
You can't do this in JAVA.
57
Name:
Anonymous
2011-04-24 17:17
>>1
You can do same things using python+scipy.
58
Name:
Anonymous
2011-04-24 17:20
>>1
You can do same things using Lisp.
59
Name:
Anonymous
2011-04-24 18:01
60
Name:
Anonymous
2011-04-24 18:01
61
Name:
Anonymous
2011-04-24 18:29
>>60
fuck you lithper faggot
62
Name:
Anonymous
2011-04-24 18:40
63
Name:
Anonymous
2011-04-24 19:10
>>59
fuck you phytonista faggot
64
Name:
Anonymous
2011-04-24 19:11
I can do this in C++ or JAVA in half the lines.
65
Name:
Anonymous
2011-04-24 19:41
>>64
I can do Java in C++ in half the lines.
66
Name:
Anonymous
2011-04-24 20:09
Could Matlab be successfully replaced by R in scientific researches?
67
Name:
Anonymous
2011-04-24 20:14
>>66
Matlab could be successfully replaced by
a steaming pile of shit in anything.
68
Name:
Anonymous
2011-04-24 20:14
>>67
yeah, but most people wouldn't even notice if you did that.
69
Name:
Anonymous
2011-04-24 20:21
Java++
70
Name:
Anonymous
2011-04-24 20:33
>>67
Buttdevastated lithper faggot.
71
Name:
Anonymous
2011-04-25 9:39
>>66
For all I know, R is reigning supreme in stats.
I don't know much.
72
Name:
Anonymous
2011-04-25 12:51
73
Name:
Anonymous
2011-04-25 14:34
Mathematica is for real men.
74
Name:
Anonymous
2011-04-25 17:04
[fart]%function definition
f = sin(t) .* (t < t_n/4);
f = f + 1 .* (t >= t_n/4);
f = f - (cos(t)+1) .* (t >= t_n/2);
f = f .* (t < 3*t_n/4);
t=t';f=f'; %transpose to create column vectors
a=ifft(f); %Fourier series coefficients
p=ones(n,k)*a(1)/2;
for i = 2 : k
for j = 2 : i
p(:,i)=p(:,i) + real(a(j))*cos((j-1)*w_0*t) ...
+ imag(a(j))*sin((j-1)*w_0*t);
end
end
p=2*p;
plot(t,f,'k'); hold on;[/fart]
75
Name:
Anonymous
2011-04-26 7:28
76
Name:
Anonymous
2011-04-26 8:06
77
Name:
Anonymous
2011-04-26 8:12
78
Name:
Anonymous
2011-04-26 8:17
79
Name:
Anonymous
2011-04-26 8:22
80
Name:
Anonymous
2011-04-26 8:27
81
Name:
Anonymous
2011-04-26 8:33
82
Name:
Anonymous
2011-04-26 8:38
83
Name:
Anonymous
2011-04-26 8:43
84
Name:
Anonymous
2011-04-26 8:48
85
Name:
Anonymous
2011-04-26 8:54
86
Name:
Anonymous
2011-04-26 8:59
87
Name:
Anonymous
2011-04-26 9:04
88
Name:
Anonymous
2011-04-26 9:10
89
Name:
Anonymous
2011-04-26 9:15
90
Name:
Anonymous
2011-04-26 9:20
91
Name:
Anonymous
2011-04-26 9:25
92
Name:
Anonymous
2011-04-26 9:31
93
Name:
Anonymous
2011-04-26 9:36
94
Name:
Anonymous
2011-04-26 9:41
95
Name:
Anonymous
2011-04-26 9:46
96
Name:
Anonymous
2011-04-26 9:51
97
Name:
Anonymous
2011-04-26 9:57
98
Name:
Anonymous
2011-04-26 10:02
99
Name:
Anonymous
2011-04-26 10:08
100
Name:
Anonymous
2011-04-26 10:12
101
Name:
Anonymous
2011-04-26 10:25
102
Name:
Anonymous
2011-04-26 10:30
103
Name:
Anonymous
2011-04-26 10:35
104
Name:
Anonymous
2011-04-26 10:39
105
Name:
Anonymous
2011-04-26 10:44
106
Name:
Anonymous
2011-04-26 10:49
107
Name:
Anonymous
2011-04-26 10:54
108
Name:
Anonymous
2011-04-26 10:58
109
Name:
Anonymous
2011-04-26 11:03
110
Name:
Anonymous
2011-04-26 11:08
111
Name:
Anonymous
2011-04-26 11:12
112
Name:
Anonymous
2011-04-26 11:17
113
Name:
Anonymous
2011-04-26 11:22
114
Name:
Anonymous
2011-04-26 11:27
115
Name:
Anonymous
2011-04-26 11:31
116
Name:
Anonymous
2011-04-26 11:36
117
Name:
Anonymous
2011-04-26 11:41
118
Name:
Anonymous
2011-04-26 11:41
SEPPLES > MATLAB
119
Name:
Anonymous
2011-04-26 11:46
120
Name:
Anonymous
2011-04-26 11:51
121
Name:
Anonymous
2011-04-26 11:56
122
Name:
Anonymous
2011-04-26 12:00
123
Name:
Anonymous
2011-04-26 12:05
124
Name:
Anonymous
2011-04-26 12:10
125
Name:
Anonymous
2011-04-26 12:14
126
Name:
Anonymous
2011-04-26 12:19
127
Name:
Anonymous
2011-04-26 12:24
128
Name:
Anonymous
2011-04-26 12:28
129
Name:
Anonymous
2011-04-26 12:28
OVER 20LBS OF PUSSY ASS AND PUSSY FARTS!!!
130
Name:
Anonymous
2011-04-26 12:33
131
Name:
Anonymous
2011-04-26 12:38
132
Name:
Anonymous
2011-04-26 12:43
133
Name:
Anonymous
2011-04-26 12:47
134
Name:
Anonymous
2011-04-26 12:52
135
Name:
Anonymous
2011-04-26 12:57
136
Name:
Anonymous
2011-04-26 13:01
137
Name:
Anonymous
2011-04-26 13:06
138
Name:
Anonymous
2011-04-26 13:11
139
Name:
Anonymous
2011-04-26 13:16
140
Name:
Anonymous
2011-04-26 13:20
141
Name:
Anonymous
2011-04-26 13:25
142
Name:
Anonymous
2011-04-26 13:30
143
Name:
Anonymous
2011-04-26 13:34
144
Name:
Anonymous
2011-04-26 13:39
145
Name:
Anonymous
2011-04-26 13:44
146
Name:
Anonymous
2011-04-26 13:49
147
Name:
Anonymous
2011-04-26 13:53
148
Name:
Anonymous
2011-04-26 13:58
149
Name:
Anonymous
2011-04-26 14:03
150
Name:
Anonymous
2011-04-26 14:07
151
Name:
Anonymous
2011-04-26 14:12
152
Name:
Anonymous
2011-04-26 14:17
153
Name:
Anonymous
2011-04-26 14:22
154
Name:
Anonymous
2011-04-26 14:26
155
Name:
Anonymous
2011-04-26 14:31
156
Name:
Anonymous
2011-04-26 14:36
157
Name:
Anonymous
2011-04-26 14:41
158
Name:
Anonymous
2011-04-26 14:45
159
Name:
Anonymous
2011-04-26 14:50
160
Name:
Anonymous
2011-04-26 14:55
161
Name:
Anonymous
2011-04-26 15:00
162
Name:
Anonymous
2011-04-26 15:05
163
Name:
Anonymous
2011-04-26 15:09
164
Name:
Anonymous
2011-04-26 15:14
165
Name:
Anonymous
2011-04-26 15:23
166
Name:
Anonymous
2011-04-26 15:28
167
Name:
Anonymous
2011-04-26 15:33
168
Name:
Anonymous
2011-04-26 15:38
169
Name:
Anonymous
2011-04-26 15:42
170
Name:
Anonymous
2011-04-26 15:47
171
Name:
Anonymous
2011-04-26 15:52
172
Name:
Anonymous
2011-04-26 15:56
173
Name:
Anonymous
2011-04-26 16:01
174
Name:
Anonymous
2011-04-26 16:06
175
Name:
Anonymous
2011-04-26 16:11
176
Name:
Anonymous
2011-04-26 16:15
177
Name:
Anonymous
2011-04-26 16:20
178
Name:
Anonymous
2011-04-26 16:25
179
Name:
Anonymous
2011-04-26 16:30
180
Name:
Anonymous
2011-04-26 16:35
181
Name:
Anonymous
2011-04-26 16:40
182
Name:
Anonymous
2011-04-26 16:44
183
Name:
Anonymous
2011-04-26 16:49
184
Name:
Anonymous
2011-04-26 16:54
185
Name:
Anonymous
2011-04-26 16:59
186
Name:
Anonymous
2011-04-26 17:03
187
Name:
Anonymous
2011-04-26 17:08
188
Name:
Anonymous
2011-04-26 17:13
189
Name:
Anonymous
2011-04-26 17:18
190
Name:
Anonymous
2011-04-26 17:23
191
Name:
Anonymous
2011-04-26 17:32
192
Name:
Anonymous
2011-04-26 19:03
193
Name:
Anonymous
2011-04-26 19:05
Why did you reply to the thread so many times with no comment?
194
Name:
Anonymous
2011-04-26 19:10
195
Name:
Anonymous
2011-04-26 19:14
196
Name:
Anonymous
2011-04-26 19:19
197
Name:
Anonymous
2011-04-26 19:33
198
Name:
Anonymous
2011-04-26 19:37
199
Name:
Anonymous
2011-04-26 19:43
200
Name:
Anonymous
2011-04-26 19:47
201
Name:
Anonymous
2011-04-26 19:51
202
Name:
Anonymous
2011-04-26 19:56
203
Name:
Anonymous
2011-04-26 20:00
204
Name:
Anonymous
2011-04-26 20:10
205
Name:
Anonymous
2011-04-26 20:14
206
Name:
Anonymous
2011-04-26 20:19
207
Name:
Anonymous
2011-04-26 20:23
208
Name:
Anonymous
2011-04-26 20:27
209
Name:
Anonymous
2011-04-26 21:32
210
Name:
Anonymous
2011-04-26 21:37
211
Name:
Anonymous
2011-04-26 22:00
212
Name:
Anonymous
2011-04-26 22:43
213
Name:
Anonymous
2011-04-26 23:26
214
Name:
Anonymous
2011-04-26 23:38
215
Name:
Anonymous
2011-04-27 0:02
216
Name:
Anonymous
2011-04-27 0:55
217
Name:
Anonymous
2011-04-27 1:35
218
Name:
Anonymous
2011-04-27 1:47
219
Name:
Anonymous
2011-04-27 1:59
220
Name:
Anonymous
2011-04-27 2:03
221
Name:
Anonymous
2011-04-27 2:08
222
Name:
Anonymous
2011-04-27 2:12
223
Name:
Anonymous
2011-04-27 3:07
224
Name:
Anonymous
2011-04-27 3:12
225
Name:
Anonymous
2011-04-27 3:17
226
Name:
Anonymous
2011-04-27 3:29
227
Name:
Anonymous
2011-04-27 3:34
228
Name:
Anonymous
2011-04-27 3:38
229
Name:
Anonymous
2011-04-27 3:42
230
Name:
Anonymous
2011-04-28 13:46
>>73
Mathematica is shit.
231
Name:
Anonymous
2011-04-28 13:48
232
Name:
Anonymous
2011-04-28 14:17
>>231
That's it. I've had it with you. I'm going to have to teach you some manners since your mother never did.
233
Name:
Anonymous
2011-04-28 17:34
VICTORY TO THE FARTISTS!
234
Name:
Anonymous
2011-04-28 19:21
VICTORY TO THE FARTISTS!
235
Name:
Anonymous
2011-04-28 19:22
VICTORY TO THE FARTISTS!
236
Name:
Anonymous
2011-04-28 19:32
But whom will save Xarn?
237
Name:
Anonymous
2011-04-28 19:39
>>236
Who*
Whom is not correct in that sentence.
238
Name:
Anonymous
2011-04-28 19:50
But whom will save Xarn?
239
Name:
Anonymous
2011-04-28 20:12
240
Name:
Anonymous
2011-04-29 21:01
>>239
Fuck off and die, faggot.
241
Name:
BLACK HITLER
2011-04-30 0:43
glory BLACK AFRIKA HEIL NIGGERS. HEIL BLACK AFRIKA. NIG HEIL BLACK HITLER!
242
Name:
BLACK HITLER
2011-04-30 0:45
glory BLACK AFRIKA HEIL NIGGERS. HEIL BLACK AFRIKA. NIG HEIL BLACK HITLER!
243
Name:
WHITE HITLER
2011-04-30 0:47
glory WHITE EUROPE HEIL HONKEYS. HEIL WHITE EUROPE. SIG HEIL WHITE HITLER!
244
Name:
WHITE HITLER
2011-04-30 0:48
glory WHITE EUROPE HEIL HONKEYS. HEIL WHITE EUROPE. SIG HEIL WHITE HITLER!
245
Name:
WHITE HITLER
2011-04-30 0:50
glory WHITE EUROPE HEIL HONKEYS. HEIL WHITE EUROPE. SIG HEIL WHITE HITLER!
246
Name:
Anonymous
2011-04-30 6:23
247
Name:
Anonymous
2011-05-08 2:03
248
Name:
Anonymous
2011-05-08 2:08
MORE LIKE
SCATLAB
AMIRITE LOLLLLLLLLLLLLLLLLLLLLLLLZzz!!11oNE!!1ONE1!
249
Name:
Anonymous
2011-05-08 8:55
Okay.
So, question 1: what happened here? Why was this thread trolled into the ground?
Statement 1: when you get down to it,
>>1, Matlab's innate matrix/vector support is the only thing
to love about it. The rest is just libraries—and libraries can be ported. If I had to pick something else, though, I would probably say that I found its syntax nice most of the time, but I really wish it just used curly brackets instead of all those messy
ends. It's like they're trying to be Pascal or PL/I, but can't quite figure out what the hell they're doing. It's really distracting, especially when there's obviously just C++ underneath everything.
250
Name:
Anonymous
2011-05-08 21:26
>>249
It's written mostly in C, and a little bit of Java.
You underestimate just how useful the matrix math is.
As a former engineering student, it would have taken 10 times as long for the simulations I did in any other language. In fact a simple task, such as what was done in
>>1, would be annoying as fuck any other way.
252
Name:
Anonymous
2011-05-10 12:38
>>249
So, question 1: what happened here? Why was this thread trolled into the ground?
Happened when everyone was spamming the board. Also no one wants to post seriously.
253
Name:
Anonymous
2011-05-23 0:30
>>73
Mathematica is worthless unless you need symbolic math. And if you need symbolic math you are doing something very wrong.
254
Name:
Anonymous
2011-05-23 0:58
>>253
I do all my symbolic math by hand, but that's because I don't need it too often, but for those that do need it, I'd say its an invaluable tool.
255
Name:
Anonymous
2011-05-23 1:33
>253
There are plenty of cases in scientific computing where doing symbolic math is critical—finding the equation for a complicated integral, for example. Simpler cases exist, too, like rearranging an equation with a division operation in it so that the division occurs in the most numerically stable way possible. With some really complex equations, it's just not feasible to do it by hand like
>>254 .
256
Name:
Anonymous
2011-05-23 13:08
finding the equation for a complicated integral
Numerically integrate
257
Name:
Anonymous
2011-05-23 13:54
>>256
Inefficient in the long run.
258
Name:
Anonymous
2011-05-23 13:56
>>256
Inefficient in the long run.
259
Name:
Anonymous
2012-11-22 1:33
>>57
MATLAB doesn't force you to indent your code
260
Name:
Anonymous
2013-05-30 18:08
Spam the thread