Posted: 15th October 2005 10:09
|
|
![]() |
One of the humorous reasons for being my major at my school, according to our t-shirt, is "Make MATLAB your b****." Well, I haven't quite done that yet, despite the fact that I've been using MATLAB for quite a lot of different things now, and I still need help on how to do stuff.
For those of you who don't know what MATLAB is, it's a pretty good mathematics software whose basis of operation is the matrix--a bunch of numbers arranged in a specific configuration in a chart-like frame. (Hence the name, "MATrix LABoratory".) Due to this feature, it can do quite a lot of convenient things to charts and various organized batches of numerical data. I've got three questions that I'd like help on: 1. How do you produce a matrix of a whole bunch of the same value? I'm pretty sure there's a better way than typing in [3.5 3.5 3.5 3.5 3.5;3.5 3.5 3.5 3.5 3.5], for example, but I can't remember or don't know what it is (can't remember if I ever learned such a function). 2. Does MATLAB do linear regression (it probably does), and if yes, how does it work? Like, what functions do I need to use, or is there a separate sub-window or whatnot that I have to use to do linear regression? Right now, I have to transfer numbers between my TI-89 (on which I know how to do linear regression) and MATLAB (on which manipulating numbers is a lot easier). For that matter, does MATLAB have non-linear regression capability, and if so, how can I use it? 3. How do you change the number of digits displayed after the decimal? I remember learnin this function in some obscure situation, but I've forgotten it, unfortunately. Part of the reason of my asking this is that MATLAB has a very crappy help file. Searching the help archives almost invariably turns up nothing on what you want to look for; it's usually a better idea to use the 'help' command to find out what a particular function name does. Problem is, if I've forgotten or don't know some of the names of various functions that I need to use, then that's a problem. -------------------- Check the "What games are you playing at the moment?" thread for updates on what I've been playing. You can find me on the Fediverse! I use Mastodon, where I am @[email protected] ( https://sakurajima.moe/@glennmagusharvey ) |
Post #99798
|
Posted: 15th October 2005 19:54
|
|
![]() Posts: 704 Joined: 9/12/2002 ![]() |
1. use a for loop for (number of columns) iters and do ones(), then multiply it by the scalar.
2. uhm, of course matlab does linear and any-order regression. but i don't have any idea what you possibly could want here. if the actual regression is what is important to you, then use regress(). |
Post #99819
|