Register to reply 
What would be the best way to learn matlab? 
Share this thread: 
#1
Aug2509, 02:44 AM

P: 44

What would be the best way to learn matlab? what should I learn first? I plan on using it to program and solve physics/math problems and hopefully some other stuff. Is knowing c c++ or any other programming language necessary to learn matlab? also what are some things you use it for? thanks!



#2
Aug2509, 05:26 AM

P: 461

The best way to learn a programming language is to obtain small examples (less than 20 lines of code, or so, and if you're new to programming, keep it down to just a few lines) and try making changes in them to see what happens. Be sure you well understand the purpose of the example, or playing with it will only confuse you! Its nice to pick examples that output graphics because they're more fun. No, you shouldn't learn some other language first. I've also messed around with SciLab, which is free. SciLab syntax and common library calls are a bit different from matlab.



#3
Aug2509, 11:49 PM

Emeritus
Sci Advisor
PF Gold
P: 10,428

Have you read the Getting Started portion of the MATLAB documentation?
 Warren 


#4
Aug2609, 04:16 PM

P: 44

What would be the best way to learn matlab?
just started. Learning about matrices right now 


#5
Aug2709, 04:05 PM

P: 44

okay, so i read the getting started and took a few notes, but am still a little lost. I can graph stuff pretty good and mess around with matrices. I still can't figure out how to program or how to start. I need to write a program for a robot that will make it move and follow a line using light sensors.



#6
Aug2709, 05:57 PM

Emeritus
Sci Advisor
PF Gold
P: 10,428

DrDanger,
You really need to read the documentation. There's a section called "Getting Started," which you apparently have found. Below it is a section called "Programming Fundamentals." As far as your robotics projects, you have perhaps bitten off more than you can chew.  Warren 


#7
Aug2709, 06:15 PM

P: 44

You're probably right. so where would be a good place to start? or good books to read?



#8
Aug2709, 06:43 PM

Emeritus
Sci Advisor
PF Gold
P: 10,428

The documentation would be a good place to start. If you have specific questions, we can help you with them.
 Warren 


#9
Aug2709, 07:24 PM

P: 44

Okay thanks. I will try to be specific, but you have to understand I have been doing this for about three weeks so my vocabulary on the subject and knowledge of it is poor. Okay so here is the deal I am using a PIC processor(20 pin). I have on it two light sensors that were given to me by a professor. They are plugged into 1 pin called ra2 or ra0 can't remember. I think I am going to change this and plug them into their own pins. I guess my questions would be as follows: I know how to make it move ( i think ) but i don't know how to start it, what i mean is there are two motors each connected to a pin. in matlab how do i control these pins? do i give them a name or do they have one already? I read about variables, else, if, for, while, and a few other functions a little bit. In order to make it run i set both wheels to 1 right? and to make it stop i set them to 0? For the light sensors i think im gonna make it where if you shine light on one it turns right and for the other it turns left. so i guess i would use an if and say if light >20 then do this? am i on the right track?



#10
Aug2709, 09:00 PM

Emeritus
Sci Advisor
PF Gold
P: 10,428

We have no idea how your circuit is wired up, nor how you're connecting MATLAB to your PIC, so there's no way we can be of any help. Also, why are you talking to us instead of your professor? You are paying him to answer all of your questions to your satisfaction, and it sounds like you need to ask him for an appointment to get additional help. Are you at least attending his office hours?
 Warren 


#11
Aug2709, 09:50 PM

P: 44

He is in india, and he is not my professor, he is just a professor lol if that makes any sense. I am using a thing called pickit or something like that. basically it has six prongs that connect into my circuit where there is a six pronged piece, then there are wires going from that to the chips. then i connect to my laptop via usb. I can upload pics if that will help any.



Register to reply 
Related Discussions  
Matlab: How to apply filters to and ECG signal using matlab?  Math & Science Software  2  
Matlab Missing Matlab operator  Engineering, Comp Sci, & Technology Homework  2  
Matlab help  Engineering, Comp Sci, & Technology Homework  1  
MATLAB Help  Math & Science Software  3 