f

#### matlab question

```how do i multiple columns of a matrix to get the average of a row.
eg.
1 68 45 92
i need to exclude the 1 and add the other 3 columns to get the average.
once i have the average of this one, i need to do the same thing with 20 other rows.
any help is appreciated by this newbie to matlab!!

-Brett
```
 0
Bashboc
2/1/2014 10:18:09 PM
comp.soft-sys.matlab 211266 articles. 19 followers. lunamoonmoon (257) is leader.

1 Replies
324 Views

Similar Articles

[PageSpeed] 5

```On 2/1/2014 4:18 PM, Bashboc wrote:
> how do i multiple columns of a matrix to get the average of a row. eg.
> 1 68 45 92
> i need to exclude the 1 and add the other 3 columns to get the average.
> once i have the average of this one, i need to do the same thing with 20
> other rows.
> any help is appreciated by this newbie to matlab!!
>

mean(:,2:end,2)

See

doc mean
doc colon
doc end

for details

--

```
 0
dpb
2/1/2014 11:38:59 PM

Similar Artilces:

How does matlab work in this issue ? a matlab principle question
Hello everyone I have an ODE solver computing the temperature every month during a year this script will do the job for j=1:12 [t,T]= ode45(@monthly_solver,tspan,Tic,[],monthly_heat(j),h2(j),); end where Tic is the intial temperature and J loops represents the months Now the question is about matlab principle and how does it work with the initial condition? i mean as the last temperature of the 1st month is the begining temperture of the 2nd month and the last temp. of the 2nd month is the begining temp. of the 3rd month and so on. Do i need to write a command to do ...

Matlab Architecture Question
I am interested in hearing ideas about the best ways to create "modules" in matlab? The goal is to have one interface, where I can easily switch routines, and have different versions of the routine run. For example, suppose I have a routine to recognize license plates. It needs to be initialized, and then on subsequent calls it needs to be run. Later one, I want to swap the license plate recognition file, with another one, and have the new one take effect. Is there an established 'best practice' for this in Matlab? - Pat [ I'm upgrading to Matlab 2009a, from 2005<something>. ] In article <h4kqpa\$l9r\$1@fred.mathworks.com>, "Pat Finder" <pfinder@netacc.net> wrote: > I am interested in hearing ideas about the best ways to create "modules" in > matlab? > > The goal is to have one interface, where I can easily switch routines, and > have different versions of the routine run. > > For example, suppose I have a routine to recognize license plates. It needs > to be initialized, and then on subsequent calls it needs to be run. > > Later one, I want to swap the license plate recognition file, with another > one, and have the new one take effect. > > Is there an established 'best practice' for this in Matlab? > > - Pat > > [ I'm upgrading to Matlab 2009a, from 2005<something>. ] Hi "Pat", One way to do this would be to manip...

Run Matlab ... from Matlab
Hello, Is there any limitation to run Matlab from Matlab, as a system command, on Linux platforms ? I tried to start Matlab, both using the ! syntax (!matlab&) or the system command (system('matlab&')), the Matlab splash screen appears, but the new Matlab session closes rapidly . When I do the same with a script of mine (system('matlab -r "myscript"&')), my script is being executed, but Matlab finally crashes . If I remove the &, it works well, but the first Matlab session is blocked till I close the second one . I run Matlab on a Linux 64bits platform . Thanks in advance, Nicolas On 10-12-03 01:22 AM, Nicolas wrote: > Is there any limitation to run Matlab from Matlab, as a system command, > on Linux platforms ? > I tried to start Matlab, both using the ! syntax (!matlab&) or the > system command (system('matlab&')), the Matlab splash screen appears, > but the new Matlab session closes rapidly . > When I do the same with a script of mine (system('matlab -r > "myscript"&')), my script is being executed, but Matlab finally crashes . > If I remove the &, it works well, but the first Matlab session is > blocked till I close the second one . > I run Matlab on a Linux 64bits platform . It appears there is a parsing problem in the script that invokes Matlab. Here's an example of what I had to do to get around it: !matlab -r \""...

MATLAB talking to MATLAB?
For my project, I need to have a client program (MATLAB executable) talking to a server program (also MATLAB executable) to query data. Is there any easy way to accomplish that? I appreciate any help that I can get on that. Thanks. Cheers, Hoi Oops, I forgot to mention. There are multiple clients querying the server, so I guess serial objects + remote serial port wouldn't work. "Hoi Wong" <wonghoi.ee@gmail.com_> wrote in message news:f3ald6\$gg4\$1@news.Stanford.EDU... > For my project, I need to have a client program (MATLAB executable) > talking to a ser...

Some questions on matlab
Hi all, i am using matlab and encountered some problems. Kindly advice. 1)i am using newff function to create a neural network.After which, someone advised me to set some of the parameters ,for example, net.performFcn,net.trainParam.goal and many more. But i tried using my matlab help and search for function to llok up for what these parameters do. However, i can't find any help on these parameters. Where can i find them? 2)i intend to use the train function to train my network. In the train function, according to the help file,we can also give T(network targets) as input. Can someone ki...

Calling Compiled MATLAB from MATLAB
Hello everyone, How do I compile MATLAB M files into a form that can then be called from within the MATLAB interpreter? A roundabout way would seem to be to (somehow) Turn the matlab code into C (I think mcc does this), then compile this C code into MEX format and call that. Is there an easier way? I have the MATLAB compiler, so I just need to know what to do with it to get this to work. Thanks in advance, Sina sina.tootoonian wrote: > > > Hello everyone, > > How do I compile MATLAB M files into a form that can then be called > from within the MATLAB interpreter? A roundabout way would seem to > be > to (somehow) Turn the matlab code into C (I think mcc does this), > then > compile this C code into MEX format and call that. Is there an > easier > way? I have the MATLAB compiler, so I just need to know what to do > with > it to get this to work. > > Thanks in advance, > > Sina > > HELP MEX > HELP MEX Or, better, HELP MCC help pcode pseudo code is useful to obfuscate code - protect algorithms, yet still run at full speed and be distributable to other matlab users sina.tootoonian wrote: > > > Hello everyone, > > How do I compile MATLAB M files into a form that can then be called > from within the MATLAB interpreter? A roundabout way would seem to > be > to (somehow) Turn the matlab code into C (I think mcc does this), > then > compile this C code into MEX format and call that...

Matlab plots outside Matlab
I'm making an end-user application where I would like to use Matlab functionality both for calculation and plotting. Matlabs GUI builder guide does not satisfy my needs (no support for f.ex. internal frames and other nescessities), so I'm planning to compile my Matlab code and use other API (Java, QT or something) for GUI. My problem is then, that I loose access to the neat plotting commands availible under matlab GUI... Is there a way of integrating Matlabs plot functionality into another GUI system? - has it been done? - I appreciate any response! - P�l Berge ...

Calling Matlab in C in Matlab
Hi everybody! My problem can be described as follows. I have a tool in Matlab that requires calling an optimisation algorithm in C. This algorithm consists of several C-files, one of which contains the function to be minimised (CFUNCTION), and another is the main algorithm file (CMAIN). Now what I want to do is to call Matlab from CFUNCTION or CMAIN and specify my custom function (MFUNCTION) to be minimised. So, I'm calling Matlab from C from Matlab. I'm a newbie in C and MEX files. Should I rewrite CMAIN as a MEX file and include CFUNCTION in this and then use mxCallMATLAB? Or can...

Matlab how to question?
I am a student of engineer, and I am in a course that's call numeric calculus. I have to do a shore an I'm stuck in a question. I have to minimize the error of an aproximation and make a matlab program that do that, just receiving a few points in two dimensions. More clearly, I will receive a table with 20 points, like (x1,y1)(x2,y2)...(x20,y20), and with the method "ortogonal square minimus" (Something like that) I have to minimize the error of an aproximate polynomial. Some clues? I would apreciate a lot any help anyone may do. Thanks. jim In article <4025405.1180395885...

DLL creating by Matlab for Matlab
I would like to know if it is possible to convert several M-files into one DLL with Matlab (by using mcc or mex or other functions) and use this DLL with Matlab. How can I do that? I could create DLL with mcc -l xxx.m but I can't use this DLL with Matlab (error: "??? The function, script or class xxx cannot be indexed using {} or . indexing.") I have a project on Matlab with just M-files and I want to give this project to someone who want to use it on Matlab too, but I don't want to give him the source M algorithms. Moreover, I don't want to have an executable....

from Delphi to matlab and matlab to delphi
How to send vars from Delphi to Matlab ? and viceverse, from matlab to delphi ? thanks, it is dificult, and not found answers in the internet. jairo serrano wrote: > > > How to send vars from Delphi to Matlab ? and viceverse, from matlab > to delphi ? thanks, it is dificult, and not found answers in the > internet. When I want to use Matlab variables in another program, I write them to file. You can use comma separated files (csv). Try: > help csvwrite > help dlmwrite Works fine for me. Hope this helps, Niels jairo serrano wrote: > How to send vars from Delphi to Matlab ? and viceverse, from matlab > to delphi ? thanks, it is dificult, and not found answers in the > internet. The simplest is with OLE. Have a look here: - Francis Burton, "Callin Matlab from Delphi" #, 19 Nov 2003 4:27 pm </WebX?50@@.eecb61d> Two sample projects are given here: - <http://www.djpate.freeserve.co.uk/Matlab.htm> From Matlab to Delphi you would have to write a mex files, thats more difficult. Regards, Peter hi i did the connection between delphi4.0 and matlab6.5 and I could cacth the value from Delphi to Matlab but can't to cacth the value from Matlab to Delphi, Do you have an idea??? I think that this project it is look like with yours , Did you make this project? Thanks in Advance, Thiago Holanda jairo serrano wrote: > > > How to send vars from Delphi to Matlab ? and viceverse, from matlab > to delphi ? thanks, it...

Few Questions About MATLAB
Hi, was wondering if anyone could help. there are a few things i need to know about some Matlab functions 1- if Pwelch and fft are used to find the Spectral Power Density. but how come when u apply them to the same data, the graphs look different? 2- when using the sendmail function, how does Matlab make the connection and send the data? ive looked at the code that Matlab uses for "sendmail" but its very difficult to understand. if anyone could help, i would be really greatful . thanks. ...

Matlab engine with matlab R2010b
Hello All, I'm working with an aplication that use the matlab engine. I made the C++ program and it is working well in my pc with matlab 2007b, but the same very basic program shows an error when I tried to compile it in a pc with matlab R2010b. The error is about the icuuc32.dll. ¿Why is asking this DLL? How can I solve this?. Thanks¡ ...

question in matlab
I have been plotted a 3D counter plot via the commands [C,h]=contour3(w,p,green3,10); t = clabel(C,h,'labelspacing',72) get(t(1)) with run the comment in matlab recived this output: Annotation = [ (1 by 1) hg.Annotation array] BackgroundColor = none Color = [0 0 0] DisplayName = EdgeColor = none Editing = off Extent = [0 0 0 0] FontAngle = normal FontName = Helvetica FontSize = [10] FontUnits = points FontWeight = normal HorizontalAlignment = center LineStyle = - LineWidth = [0.5] Margin = [2] Position = [-0.661507 0.649385 -0.01794] Rotation = [290.824] String = -0...

parallel matlab
Hi all, I'm going to work on a project involving a parallel version of MATLAB - I'm aware of various efforts like MATLAB-*P and so on Right now I need to read up on some material regarding MATLAB internals eg: How are the ATLAS(or is it BLAS) routines called in MATLAB? How does MATLAB's C code store information in memory, cache'ing etc? How is one to get at those? Do you know of any suitable reference(s)/resource(s)? Thank you very much, Aravind ...

Matlab AM question
Dear all, I am trying to implement a very simple version of an AM receiver in Matlab but as I am new to this software package I seem to be getting nowhere. So far I have searched the web and Matlab books for examples that would help me to understand how this could be done without much success. I now this is probably a silly thing to ask but could anyone guide me in the right direction, i.e. links to websites, etc. or maybe provide me with a hints. Anything would help really. Your help is much appreciated. Thanks Justin. -- --------------------------------------------------------...

I have 2 signals with sampling freq 50Hz and different duration. a[n] = [a1 a2 a3 .... an] b[n] = [b1 b2 b3 ............................... bn] In matlab, how to find: A[z]xB[z] A[z]/B[z] Z'(A[z]/B[z]) where Z'() is the inverse Z transform. Thank you! Edw ...

matlab to matlab remote execution
Hi I have two win PCs running matlab 7. One is slow and other is a high spec fast PC. They are connected to LAN. The directory on fast PC where all matlab work takes place has been mounted as a drive on slow PC. Hence this directory on fast PC can be accessed from slow PC's matlab session. I want to let the user on slow PC run some computationally intense M scripts in his matlab session but execute them on fast PC. I tried usual unix like method. First installed telnet server on fast PC. Then used telnet client on slow PC to log on fast PC. If I attempt to start matlab in slow PC telnet ...

questions on matlab
Dear Sir My name is Tusajigwe, student from Brighton University taking MSC in Digital Electronics and Communication. Now am doing a research on Wireless Communication which concern with email alert to GSM users on their cell pohones,what i want from this project is to make GSM users to receive email alert when they have got new mail and this service will be offered by GSM operator ways of achieving 1)To establish link between ISP and SMS centre,because e-mail alert will be in the form of text message and ISP is the one who knows if someone has mail after see it ISP forward to SMS centre by us...

MATLAB question
I've posted this on the MATLAB newsgroup, but that group is pretty noisy and I know there are a lot of MATLAB users here, so here goes... I'm looking for suggestions/code on doing the following. They generally get more complex as the list goes on, numbers (1) and (4) are really the startings point and most important to me. 1) Given a sequence of bytes, find all occurances of that sequence in a binary file. 2) Given a sequence of bytes with possible wildcards (fixed wildcard length of one byte), find all occurances of that sequence in a binary file. 3) Given a sequence of bytes ...

Few matlab questions
Hello, I have this questions for you. I hope some one can help me. So I have a background image and I want to insert another image over it. A ball for example. But this ball get on top of the background and it streches to full screan. 1) How to make matlab plot a picture in its original size. I don`l want to be stretched. 2) My ball picture is a PNG file so i need not to show the transparent pixels. I used: A = imread('ball.png','BackgroundColor','none'); image(A) but it isn`t working.. 3) Can I load an animation or sound in the plot ...

i made a *.m file with de next code q=1.6e-19; Vd=-80; Eo=8.85e-14; E=11.9*Eo; Na=logspace(10,19,20); E_rup_1=20+5*log(Na/1e14)+Na/1e17; E_rup_2=sqrt((-2*q*Na*Vd)/E)*1e-4; semilogx(Na,E_rup_1,Na,E_rup_2) I have ploted in logaritimic scale the functions, "E_rup_1" and "E_rup_2" depending off Na, on the plot and for a Na value, the 2 functions are equal. How can i get the Na value? Thanks If you're trying to graphically determine at which value(s) of Na the two curves are equal, try ginput. HELP GINPUT Kyle beporo wrote: > > > i made a *.m file with de n...

matlab in JAVA or java in MATLAB?

Spawning matlab from within matlab
Hello all, I would like to spawn multiple matlab processes from an '.m' script. Meaning, run an m-file from a 'parent' Matlab that launches, say, 8 more 'children' matlab processes. I'd like to do it in such a way that the same m-file in the 'parent' is able to close down, or kill, all the 'children' processes. Any suggestions? Joe ...

Web resources about - matlab question - comp.soft-sys.matlab

German question - Wikipedia, the free encyclopedia
"Kleindeutschland" redirects here. For the neighborhood in New York City, see Little Germany, Manhattan . 1820 map of Central Europe showing ...

Answering a Rhetorical ‘Lunch’ Question
On the heels of Diane Clehane ’s latest FishbowlNY “Lunch” column Wednesday, there was the following exchange on Twitter between Politico Media’s ...

The most absurdly-framed question at last night’s debate
John Kasich didn’t get very much attention at last night’s debate, which is one of the reasons why Frank Luntz’s insta-focus group indicated ...

Facebook uses a unique intern evaluation question to find the best young talent
Facebook has the highest-rated internship program in the US , according to a report by Glassdoor. Vlad Fedorov, Facebook's engineering director ...

OJ Simpson case: Questions, new twists after reports of knife discovery
CNN OJ Simpson case: Questions, new twists after reports of knife discovery CNN (CNN) Nearly 22 years after the fatal stabbing of Nicole Brown ...

Rowdy Detroit audience raises question: Should debates have audiences?
The crowd for Thursday night's GOP debate was so rowdy that it has people asking whether debates should have audiences at all.

Falcons apologize for inappropriate question at NFL combine
ATLANTA (AP) — The Atlanta Falcons have apologized for having one of their coaches ask an inappropriate question to Ohio State cornerback Eli ...

The Question Concerning Technology
One of the parts that resonates the most in Cal Newport's Deep Work is the section about quitting social media. To help us do a cost-benefit ...

Earnest Uses Conservative’s Free Speech Question To Lecture Republicans About The Supreme Court
Earnest Uses Conservative’s Free Speech Question To Lecture Republicans About The Supreme Court

'Teen Wolf' Spoilers: 5 Burning Questions We Need Answered In Season 5 Finale
Here are five burning questions that we want answered in season 5, episode 20 of "Teen Wolf."

Resources last updated: 3/6/2016 12:57:06 PM