|
||||||||||
|
||||||||||
11 Dec 2006, 15:14 (Ref:1788060) | #1 | ||
Veteran
Join Date: Jan 2003
Posts: 1,707
|
Anyone use Matlab?
I'm not expecting a huge responce from this thread but i was wondering if anyone out there is familiar with the use of the MatLab software?
I need to use it for some coursework and i'm particuarly stuck on ONE question! So please if anyone is an ace at this could you help me, please... |
||
__________________
"If there's anything more important than my ego around, I want it caught and shot now" Douglas Adams. 1952-2001 |
11 Dec 2006, 18:47 (Ref:1788214) | #2 | ||
Veteran
Join Date: Oct 2001
Posts: 544
|
i do use MATLAB, but only small parts of it.
what seems to be the problem?? |
||
|
12 Dec 2006, 05:51 (Ref:1788635) | #3 | ||
Veteran
Join Date: Oct 2002
Posts: 1,618
|
shot my man...i would honestly try the help menu though it is quite simply amazing
|
||
__________________
I refuse to let fact get in the way of my opinion |
12 Dec 2006, 07:42 (Ref:1788681) | #4 | ||
Veteran
Join Date: Jun 2005
Posts: 508
|
Go ahead, I'm a fairly heavy Matlab user.
BTW, have you tried the forums at matlabcentral.com? Ben |
||
|
12 Dec 2006, 20:08 (Ref:1789224) | #5 | ||
Veteran
Join Date: Nov 2001
Posts: 601
|
just came out in a cold sweat and started shaking. god I hated using that program at uni cracking bit of kit though!
Matlab central and the help menu as the others have said. both brilliant resourses... |
||
__________________
I love the deadlines. Especially the sound of them screaming by... |
12 Dec 2006, 21:31 (Ref:1789304) | #6 | ||
Veteran
Join Date: Oct 2005
Posts: 2,197
|
Do not mention Matlab in my presense, got to use it for Uni Coursework and I don't like it at all!
Because I can't get the dammed thing to work, that's why! |
||
__________________
Live Life in Overdrive. |
12 Dec 2006, 21:45 (Ref:1789318) | #7 | |||
Veteran
Join Date: Jun 2005
Posts: 508
|
Quote:
What won't it do? Ben |
|||
|
12 Dec 2006, 21:47 (Ref:1789320) | #8 | |||
Veteran
Join Date: Oct 2005
Posts: 2,197
|
Quote:
|
|||
__________________
Live Life in Overdrive. |
12 Dec 2006, 23:58 (Ref:1789402) | #9 | |||
Veteran
Join Date: Oct 2001
Posts: 544
|
Quote:
|
|||
|
13 Dec 2006, 04:11 (Ref:1789522) | #10 | ||
Rookie
Join Date: Jul 2005
Posts: 42
|
Well what's your question. Matlab is an excellent programming environment.
|
||
|
13 Dec 2006, 08:37 (Ref:1789624) | #11 | |||
Veteran
Join Date: Jun 2005
Posts: 508
|
Quote:
The "getting started" help is very good, so if you can't get it to do anything I'd be surprised and/or worried. Ben |
|||
|
13 Dec 2006, 13:10 (Ref:1789832) | #12 | ||
Veteran
Join Date: Jan 2003
Posts: 1,707
|
I'm quite supprised, i didn't know that the programe was widely used, thats why in my original post i said i didn't expect many replies.
I have 1 question to do for a piece of coursework, i've done all the rest but this is the sticking point. 7. Plot the two graphs y=3e-x and y=2sinx on the same plot. Use different colours and line-styles. Choose your own scales on the axes. Add a title to the graph and annotate to indicate which graph is which. i got to this... >> plot(((3*(2.71828183^-x))'c--'), [-6,2]) >> hold on >> plot((2*sin*x,'r-'), [-6,2]) >> xlabel('x-axis') >> ylabel('y-axis') >> title(['Plot of y=3*e^-x and y=2*sin*x']) >> text(150,19,'\it{y=3*e^-x}') >> text(150,21,'\it{y=2*sin*x}') and am now truly stuck as matlab wont accept it (it will accept parts of it). I am doubtful that anyone who doesn't use matlab regularly could help but if you could i'll be very grateful. |
||
__________________
"If there's anything more important than my ego around, I want it caught and shot now" Douglas Adams. 1952-2001 |
13 Dec 2006, 14:30 (Ref:1789898) | #13 | ||
Veteran
Join Date: Nov 2005
Posts: 952
|
My friend who works for a DTM/FIA GT team swears by Matlab.
It is used in industry. |
||
__________________
These comments are my personal opinion, they do not reflect the views of others at Carr Racing. Born into racing! Will never leave racing, ever! Its in my blood! |
13 Dec 2006, 14:43 (Ref:1789904) | #14 | ||
Veteran
Join Date: Jan 2003
Posts: 1,707
|
Good to know that i am not strugling with it for nothing then.
|
||
__________________
"If there's anything more important than my ego around, I want it caught and shot now" Douglas Adams. 1952-2001 |
13 Dec 2006, 15:11 (Ref:1789914) | #15 | |||
Veteran
Join Date: Jun 2005
Posts: 508
|
Quote:
Despite the fact that you have a homework assignment you haven't prepared for, I'll help you because Matlab is one of the most useful things you can learn if you want to work in Aerospace or Motorsport. PI V6 exports data directly in Matlab .MAT format - it does this for a reason. Right, now what have you done wrong? You haven't defined x. Matlab isn't normally symbolic (it has a symbolic tool box but you don't need it for what you're doing) To calculate the two equations you need: x = [0:0.1:10] This creates an array of x numbers you can operate on from 0 to 10 in 0.1 increments. You didn't specify the range you needed, adjust accordingly and search the help for defining arrays. Then you need; y = 3.*(exp(-x)); and y2 = 2.*(sin(x)); The . before the * sign means you are doing array multiplication not a matrix calc. You multiplying by one number so it doesn't matter, but it's good to understand the difference. Read the help. The semi-colon supresses the output so you don't fill the command window with numbers. Ok you now want to plot your two functions: plot(x,y,x,y2) You then need to lable the graph: legend('y = 3e^-^x','y = 2sinx' ) The ^ make the following character superscript. Type help legend in the command prompt for help. You then need a title and x and y labels. I'll let you find the help for those. Ben |
|||
|
13 Dec 2006, 15:14 (Ref:1789916) | #16 | ||
Veteran
Join Date: Mar 2002
Posts: 1,225
|
I did a subject on using Matlab in first year, but that was a while ago now. It still pops up every now and then, and it's probably come up more and more in the next couple of years of my degree.
I hate it because I don't know how to use it properly, but I'm getting better Anyway, a couple of things come to mind:
Hope I've pointed you in the right direction, but there's every chance that I haven't. F****** Matlab! EDIT: Just follow Ben's explanation. It's better than mine! |
||
__________________
"Our traction control was kinda how much your last crash was still hurting you." - Kevin Schwantz |
13 Dec 2006, 17:14 (Ref:1789967) | #17 | ||
Veteran
Join Date: Jan 2003
Posts: 1,707
|
Right i have now sucessful completed by Matlab assignment and a big thank you to everyone who has posted coments here, and especially BIG THANKS go out to Ubrben and William Dale Jr.
Well done boys, now that i've done it its obvious where i was going wrong, stupid stuff really. THANK YOU |
||
__________________
"If there's anything more important than my ego around, I want it caught and shot now" Douglas Adams. 1952-2001 |
14 Dec 2006, 06:20 (Ref:1790300) | #18 | ||
Veteran
Join Date: Oct 2002
Posts: 1,618
|
From personal experience...I don't bother coding in x and y labels...I have found it much easier to use the axis edit tool which will save the data you put in.
as ubrben said...the help menu is like mecca. There is very little matlab can't do. I utilized it last semester to basically hand code a finite difference program for a heat transfer project. if you have questions find the help and read it. it almost always has examples which are usually very helpful. |
||
__________________
I refuse to let fact get in the way of my opinion |
14 Dec 2006, 07:43 (Ref:1790346) | #19 | |||
Veteran
Join Date: Jun 2005
Posts: 508
|
Quote:
Ben |
|||
|