Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-8081-120121-160161-200201-240241-

MATLAB APPRECIATION THREAD

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)));

Name: Anonymous 2011-04-09 0:42

ENTERPRISE symbolic toolbox

Name: Anonymous 2011-04-09 1:38

Now let's sit down and wait the ``in Lisp'' guy post his code.

Name: Anonymous 2011-04-09 2:22

Name: Anonymous 2011-04-09 7:24

Best thing about Matlab are the shortcuts of it's IDE

Name: Anonymous 2011-04-09 12:55

There is no redeeming quality.

Name: VIPPER 2011-04-09 15:51

JEWS

Name: VIPPER 2011-04-09 15:53

JEWS

Name: VIPPER 2011-04-09 15:55

JEWS

Name: VIPPER 2011-04-09 15:57

JEWS

Name: Anonymous 2011-04-09 15:58

swej

Name: VIPPER 2011-04-09 15:59

JEWS

Name: test 2011-04-09 16:03

hello

Name: test 2011-04-09 16:04

hello

Name: test 2011-04-09 16:05

hello

Name: test 2011-04-09 16:06

hello

Name: test 2011-04-09 16:06

hello

Name: test 2011-04-09 16:06

hello

Name: test 2011-04-09 16:07

hello

Name: test 2011-04-09 16:08

hello

Name: test 2011-04-09 16:09

hello

Name: test 2011-04-09 16:09

hello

Name: test 2011-04-09 16:10

hello

Name: Anonymous 2011-04-09 19:11

Hello World!

Name: Anonymous 2011-04-10 0:05

How about the incredibly shitty syntax for plot()?

Name: Anonymous 2011-04-10 0:24

>>25
What's wrong with it?

Name: NIGGERFUCK 2011-04-10 1:04

#include <stdio.h>
#define NIGGERFUCK "niggerfuck"

int main() {
  printf("Hi %s", NIGGERFUCK);
  return 0;}

Name: Anonymous 2011-04-10 16:04

>>27
Hello, NIGGERFUCK!

Name: Anonymous 2011-04-12 1:53

>>5
it is IDE

Name: Anonymous 2011-04-13 4:29

>>29
fuck you're waifu

your upset

Name: Anonymous 2011-04-13 19:46

>>30
Use appropriate punctuation, please!

Name: Anonymous 2011-04-16 23:45

>>30
Go back to /jp/.

Name: Anonymous 2011-04-17 0:27

FUCK YOU

Name: Anonymous 2011-04-17 0:44

>>33
The fuck is your problem?

Name: Anonymous 2011-04-17 0:47

THE FUCK ON

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.

Name: Anonymous 2011-04-23 2:47

>>2
'>He needs symbolic math
wwwwwwwwwwwwwwwwwwwwwwww

Name: Anonymous 2011-04-23 22:46

>>37
Holy shit go back to /jp/.

Name: !MILKRIBS 2011-04-23 23:01

>>38
wwwwwww

Name: Anonymous 2011-04-23 23:32

>>39
Fuck off and die, faggot.

Name: Anonymous 2011-04-23 23:38

I dont know what this shit is I'm not a CS degree.
*Arduino guy talking*

Name: Anonymous 2011-04-24 1:46

>>41
Fuck off and die faggot.

Name: Anonymous 2011-04-24 1:49

>>42 Hey u saidthat to >>39 too!
you're an asshole. Go eat some cake!

Name: Anonymous 2011-04-24 1:51

"Sim - U - Link"?
Give "Me - A - Break" ?

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.

Name: Anonymous 2011-04-24 2:12

kus u dint get *duino.

Name: Anonymous 2011-04-24 2:14

(unless MATLAB runs on duino? doesnt look like it)

Name: Anonymous 2011-04-24 2:19

Oh I guess you can run a MATLAB session on it supposed?

Name: Anonymous 2011-04-24 2:21

the lang still looks goofy. It's not even a "fi" as the endif! :(

Name: Anonymous 2011-04-24 2:21

*for, even. Brakets ne1? wtf is wrong with you kids? what are they teaching you?

Name: Anonymous 2011-04-24 2:43

HAST THOU READ THINE SICP TODAY??????

Name: Anonymous 2011-04-24 13:33

What the fuck is wrong with this thread?

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.

Name: Anonymous 2011-04-24 14:09

How do I do thisw in JAVA?

Name: Anonymous 2011-04-24 15:44

>>53
Incidentally, the spam has increased since that faggot made that thread on /g/.

Name: Anonymous 2011-04-24 16:54

>>54
You can't do this in JAVA.

Name: Anonymous 2011-04-24 17:17

>>1

You can do same things using python+scipy.

Name: Anonymous 2011-04-24 17:20

>>1
You can do same things using Lisp.

Name: Anonymous 2011-04-24 18:01

>>58
lolno

Name: Anonymous 2011-04-24 18:01

>>57
lolno

Name: Anonymous 2011-04-24 18:29

>>60
fuck you lithper faggot

Name: Anonymous 2011-04-24 18:40

>>57
Only 500x slower.

Name: Anonymous 2011-04-24 19:10

>>59
fuck you phytonista faggot

Name: Anonymous 2011-04-24 19:11

I can do this in C++ or JAVA in half the lines.

Name: Anonymous 2011-04-24 19:41

>>64
I can do Java in C++ in half the lines.

Name: Anonymous 2011-04-24 20:09

Could Matlab be successfully replaced by R in scientific researches?

Name: Anonymous 2011-04-24 20:14

>>66
Matlab could be successfully replaced by a steaming pile of shit in anything.

Name: Anonymous 2011-04-24 20:14

>>67
yeah, but most people wouldn't even notice if you did that.

Name: Anonymous 2011-04-24 20:21

Java++

Name: Anonymous 2011-04-24 20:33

>>67
Buttdevastated lithper faggot.

Name: Anonymous 2011-04-25 9:39

>>66
For all I know, R is reigning supreme in stats. I don't know much.

Name: Anonymous 2011-04-25 12:51

>>63
U mad?

Name: Anonymous 2011-04-25 14:34

Mathematica is for real men.

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]

Name: Anonymous 2011-04-26 7:28

Name: Anonymous 2011-04-26 8:06

Name: Anonymous 2011-04-26 8:12

Name: Anonymous 2011-04-26 8:17

Name: Anonymous 2011-04-26 8:22

Name: Anonymous 2011-04-26 8:27

Name: Anonymous 2011-04-26 8:33

Name: Anonymous 2011-04-26 8:38

Name: Anonymous 2011-04-26 8:43

Name: Anonymous 2011-04-26 8:48

Name: Anonymous 2011-04-26 8:54

Name: Anonymous 2011-04-26 8:59

Name: Anonymous 2011-04-26 9:04

Name: Anonymous 2011-04-26 9:10

Name: Anonymous 2011-04-26 9:15

Name: Anonymous 2011-04-26 9:20

Name: Anonymous 2011-04-26 9:25

Name: Anonymous 2011-04-26 9:31

Name: Anonymous 2011-04-26 9:36

Name: Anonymous 2011-04-26 9:41

Name: Anonymous 2011-04-26 9:46

Name: Anonymous 2011-04-26 9:51

Name: Anonymous 2011-04-26 9:57

Name: Anonymous 2011-04-26 10:02

Name: Anonymous 2011-04-26 10:08

Name: Anonymous 2011-04-26 10:12

Name: Anonymous 2011-04-26 10:25

Name: Anonymous 2011-04-26 10:30

Name: Anonymous 2011-04-26 10:35

Name: Anonymous 2011-04-26 10:39

Name: Anonymous 2011-04-26 10:44

Name: Anonymous 2011-04-26 10:49

Name: Anonymous 2011-04-26 10:54

Name: Anonymous 2011-04-26 10:58

Name: Anonymous 2011-04-26 11:03

Name: Anonymous 2011-04-26 11:08

Name: Anonymous 2011-04-26 11:12

Name: Anonymous 2011-04-26 11:17

Name: Anonymous 2011-04-26 11:22

Name: Anonymous 2011-04-26 11:27

Name: Anonymous 2011-04-26 11:31

Name: Anonymous 2011-04-26 11:36

Name: Anonymous 2011-04-26 11:41

Name: Anonymous 2011-04-26 11:41

SEPPLES > MATLAB

Name: Anonymous 2011-04-26 11:46

Name: Anonymous 2011-04-26 11:51

Name: Anonymous 2011-04-26 11:56

Name: Anonymous 2011-04-26 12:00

Name: Anonymous 2011-04-26 12:05

Name: Anonymous 2011-04-26 12:10

Name: Anonymous 2011-04-26 12:14

Name: Anonymous 2011-04-26 12:19

Name: Anonymous 2011-04-26 12:24

Name: Anonymous 2011-04-26 12:28

Name: Anonymous 2011-04-26 12:28

OVER 20LBS OF PUSSY ASS AND PUSSY FARTS!!!

Name: Anonymous 2011-04-26 12:33

Name: Anonymous 2011-04-26 12:38

Name: Anonymous 2011-04-26 12:43

Name: Anonymous 2011-04-26 12:47

Name: Anonymous 2011-04-26 12:52

Name: Anonymous 2011-04-26 12:57

Name: Anonymous 2011-04-26 13:01

Name: Anonymous 2011-04-26 13:06

Name: Anonymous 2011-04-26 13:11

Name: Anonymous 2011-04-26 13:16

Name: Anonymous 2011-04-26 13:20

Name: Anonymous 2011-04-26 13:25

Name: Anonymous 2011-04-26 13:30

Name: Anonymous 2011-04-26 13:34

Name: Anonymous 2011-04-26 13:39

Name: Anonymous 2011-04-26 13:44

Name: Anonymous 2011-04-26 13:49

Name: Anonymous 2011-04-26 13:53

Name: Anonymous 2011-04-26 13:58

Name: Anonymous 2011-04-26 14:03

Name: Anonymous 2011-04-26 14:07

Name: Anonymous 2011-04-26 14:12

Name: Anonymous 2011-04-26 14:17

Name: Anonymous 2011-04-26 14:22

Name: Anonymous 2011-04-26 14:26

Name: Anonymous 2011-04-26 14:31

Name: Anonymous 2011-04-26 14:36

Name: Anonymous 2011-04-26 14:41

Name: Anonymous 2011-04-26 14:45

Name: Anonymous 2011-04-26 14:50

Name: Anonymous 2011-04-26 14:55

Name: Anonymous 2011-04-26 15:00

Name: Anonymous 2011-04-26 15:05

Name: Anonymous 2011-04-26 15:09

Name: Anonymous 2011-04-26 15:14

Name: Anonymous 2011-04-26 15:23

Name: Anonymous 2011-04-26 15:28

Name: Anonymous 2011-04-26 15:33

Name: Anonymous 2011-04-26 15:38

Name: Anonymous 2011-04-26 15:42

Name: Anonymous 2011-04-26 15:47

Name: Anonymous 2011-04-26 15:52

Name: Anonymous 2011-04-26 15:56

Name: Anonymous 2011-04-26 16:01

Name: Anonymous 2011-04-26 16:06

Name: Anonymous 2011-04-26 16:11

Name: Anonymous 2011-04-26 16:15

Name: Anonymous 2011-04-26 16:20

Name: Anonymous 2011-04-26 16:25

Name: Anonymous 2011-04-26 16:30

Name: Anonymous 2011-04-26 16:35

Name: Anonymous 2011-04-26 16:40

Name: Anonymous 2011-04-26 16:44

Name: Anonymous 2011-04-26 16:49

Name: Anonymous 2011-04-26 16:54

Name: Anonymous 2011-04-26 16:59

Name: Anonymous 2011-04-26 17:03

Name: Anonymous 2011-04-26 17:08

Name: Anonymous 2011-04-26 17:13

Name: Anonymous 2011-04-26 17:18

Name: Anonymous 2011-04-26 17:23

Name: Anonymous 2011-04-26 17:32

Name: Anonymous 2011-04-26 19:03

Name: Anonymous 2011-04-26 19:05

Why did you reply to the thread so many times with no comment?

Name: Anonymous 2011-04-26 19:10

Name: Anonymous 2011-04-26 19:14

Name: Anonymous 2011-04-26 19:19

Name: Anonymous 2011-04-26 19:33

Name: Anonymous 2011-04-26 19:37

Name: Anonymous 2011-04-26 19:43

Name: Anonymous 2011-04-26 19:47

Name: Anonymous 2011-04-26 19:51

Name: Anonymous 2011-04-26 19:56

Name: Anonymous 2011-04-26 20:00

Name: Anonymous 2011-04-26 20:10

Name: Anonymous 2011-04-26 20:14

Name: Anonymous 2011-04-26 20:19

Name: Anonymous 2011-04-26 20:23

Name: Anonymous 2011-04-26 20:27

Name: Anonymous 2011-04-26 21:32

Name: Anonymous 2011-04-26 21:37

Name: Anonymous 2011-04-26 22:00

Name: Anonymous 2011-04-26 22:43

Name: Anonymous 2011-04-26 23:26

Name: Anonymous 2011-04-26 23:38

Name: Anonymous 2011-04-27 0:02

Name: Anonymous 2011-04-27 0:55

Name: Anonymous 2011-04-27 1:35

Name: Anonymous 2011-04-27 1:47

Name: Anonymous 2011-04-27 1:59

Name: Anonymous 2011-04-27 2:03

Name: Anonymous 2011-04-27 2:08

Name: Anonymous 2011-04-27 2:12

Name: Anonymous 2011-04-27 3:07

Name: Anonymous 2011-04-27 3:12

Name: Anonymous 2011-04-27 3:17

Name: Anonymous 2011-04-27 3:29

Name: Anonymous 2011-04-27 3:34

Name: Anonymous 2011-04-27 3:38

Name: Anonymous 2011-04-27 3:42

Name: Anonymous 2011-04-28 13:46

>>73
Mathematica is shit.

Name: Anonymous 2011-04-28 13:48

>>230
you're shit

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.

Name: Anonymous 2011-04-28 17:34


VICTORY TO THE FARTISTS!

Name: Anonymous 2011-04-28 19:21


VICTORY TO THE FARTISTS!

Name: Anonymous 2011-04-28 19:22


VICTORY TO THE FARTISTS!

Name: Anonymous 2011-04-28 19:32

But whom will save Xarn?

Name: Anonymous 2011-04-28 19:39

>>236
Who*
Whom is not correct in that sentence.

Name: Anonymous 2011-04-28 19:50

But whom will save Xarn?

Name: Anonymous 2011-04-28 20:12

>>237
no you

Name: Anonymous 2011-04-29 21:01

>>239
Fuck off and die, faggot.

Name: BLACK HITLER 2011-04-30 0:43

glory BLACK AFRIKA HEIL NIGGERS. HEIL BLACK AFRIKA. NIG HEIL BLACK HITLER!

Name: BLACK HITLER 2011-04-30 0:45

glory BLACK AFRIKA HEIL NIGGERS. HEIL BLACK AFRIKA. NIG HEIL BLACK HITLER!

Name: WHITE HITLER 2011-04-30 0:47

glory WHITE EUROPE HEIL HONKEYS. HEIL WHITE EUROPE. SIG HEIL WHITE HITLER!

Name: WHITE HITLER 2011-04-30 0:48

glory WHITE EUROPE HEIL HONKEYS. HEIL WHITE EUROPE. SIG HEIL WHITE HITLER!

Name: WHITE HITLER 2011-04-30 0:50

glory WHITE EUROPE HEIL HONKEYS. HEIL WHITE EUROPE. SIG HEIL WHITE HITLER!

Name: Anonymous 2011-04-30 6:23

Name: Anonymous 2011-05-08 2:03

>>40
>>40
Suck my dick.

Name: Anonymous 2011-05-08 2:08

MORE LIKE
SCATLAB
AMIRITE LOLLLLLLLLLLLLLLLLLLLLLLLZzz!!11oNE!!1ONE1!

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.

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.

Name: Chat for /prog/ 2011-05-09 2:35

Looking for a good time? http://trollmegle.cel3stial.com/

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.

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.

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.

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.

Name: Anonymous 2011-05-23 13:08

finding the equation for a complicated integral
Numerically integrate

Name: Anonymous 2011-05-23 13:54

>>256
Inefficient in the long run.

Name: Anonymous 2011-05-23 13:56

>>256
Inefficient in the long run.

Name: Anonymous 2012-11-22 1:33

>>57
MATLAB doesn't force you to indent your code

Name: Anonymous 2013-05-30 18:08

Spam the thread

Don't change these.
Name: Email:
Entire Thread Thread List