05-29-2005, 12:14 PM
|
#1
|
Franchise Player
|
I saw a topic on Matlab the other day and I know a lot of fellow engineers post here so here goes:
I'm taking ENGG 407 this spring and our teacher is pretty gung-hoe about Matlab. I can do the basic stuff with C++ pretty well, but our labs seems to be designed around Matlab (ie; plotting graphs and other stuff that is tedious and difficult to do in C++).
Anyways, I get the basics of the program, but is there any way to make it so i can erase single lines off the screen (without erasing everything off the screen, which I do know how to do)? We have to hand in the source code, obviously, and it seems stupid for me to hand in code with parts that aren't correct or related to the assignment even though the program might do what it's supposed to.
Also, is there a way to insert text into lines I've already entered in (for comments, similar to using // in C++)?
|
|
|
05-29-2005, 03:46 PM
|
#2
|
n00b!
|
Ugh, I loathe Matlab.
Anyhow, why don't you use the M-file editor to type in all of your code... then copy and paste it into the actual window to see if it works? Then you can always copy the source code from your m-file editor once you know it works, and submit that.
As for comments, I believe you use the % sign.
|
|
|
05-29-2005, 05:25 PM
|
#3
|
It's not easy being green!
Join Date: Oct 2001
Location: In the tubes to Vancouver Island
|
If you go to U of C you may have seen my wandering around campus last year with a shirt saying "I Hate Matlab" it's the bane of my existance, but yes, use the m-file editor, and % is for comments. I've got some good signal analysis examples for code. If you want to see them PM me..
__________________
Who is in charge of this product and why haven't they been fired yet?
|
|
|
05-29-2005, 07:37 PM
|
#4
|
n00b!
|
Quote:
Originally posted by kermitology@May 29 2005, 11:25 PM
If you go to U of C you may have seen my wandering around campus last year with a shirt saying "I Hate Matlab" it's the bane of my existance, but yes, use the m-file editor, and % is for comments. I've got some good signal analysis examples for code. If you want to see them PM me..
|
Sweet shirt man! LOL!
|
|
|
05-29-2005, 07:48 PM
|
#5
|
Franchise Player
|
Quote:
Originally posted by HelloHockeyFans@May 29 2005, 02:46 PM
Ugh, I loathe Matlab.
Anyhow, why don't you use the M-file editor to type in all of your code... then copy and paste it into the actual window to see if it works? Then you can always copy the source code from your m-file editor once you know it works, and submit that.
As for comments, I believe you use the % sign.
|
Thanks for the help. Is the M-file editor something I open in the Matlab program or is it just what I'd open off my user folder (a saved Matlab file, similar to .cpp)?
Sorry if this is a stupid question, but Friday was the first time I've even used the program and we got no instruction but some really crappy online tutorial. I'd use C++, but, like I said, the lab almost forces you to use Matlab (unless you're a programming wiz).
|
|
|
05-29-2005, 08:31 PM
|
#6
|
n00b!
|
I believe it's File--> New ---> M-file.
Hey pal, don't feel bad. Nobody in our faculty has ever had any tutorials on how to use Matlab neither. They threw us into the lab, gave us one class where they went through EXTREMELY simple stuff like how to clear the screen, and then went on to assign us crazy-difficult problems. :angry:
Have fun!
|
|
|
05-29-2005, 08:46 PM
|
#7
|
Scoring Winger
|
Mick the Toronto CPHL GM did matlab. Send him a message.
__________________
Those days are past now, and in the past they must remain, but we can still rise now and be a nation again.
|
|
|
05-29-2005, 08:56 PM
|
#8
|
Franchise Player
Join Date: Feb 2002
Location: Silicon Valley
|
Quote:
Originally posted by kermitology@May 29 2005, 11:25 PM
If you go to U of C you may have seen my wandering around campus last year with a shirt saying "I Hate Matlab" it's the bane of my existance...
|
Where did you get that? Can I get one of those too?
__________________
"With a coach and a player, sometimes there's just so much respect there that it's boils over"
-Taylor Hall
|
|
|
05-29-2005, 09:19 PM
|
#9
|
n00b!
|
Quote:
Originally posted by Abstract@May 30 2005, 02:46 AM
Mick the Toronto CPHL GM did matlab. Send him a message.
|
Oh, REALLY?
Bwwahahaha... I'm gonna bombard his msn with Matlab questions now.
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -6. The time now is 10:38 AM.
|
|