f

#### how can i write this statement labels=[1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;]; in compress fo

```How to write it in compact form to avoid repetition
```
 0
shah
6/25/2014 1:01:01 AM
comp.soft-sys.matlab 211264 articles. 25 followers. lunamoonmoon (257) is leader.

1 Replies
4108 Views

Similar Articles

[PageSpeed] 12

```"shah " <shahkhn3@gmail.com> wrote in message <lodugh\$8hr\$1@newscl01ah.mathworks.com>...
> How to write it in compact form to avoid repetition

You'll find in this thread different solutions for similar question

Bruno
```
 0
Bruno
6/25/2014 9:14:13 AM

Similar Artilces:

[1 1 1 1 1 ;2 2 2 2 2 ;3 3 3 3 3 3;....;n n n n n]
Hi, Anybody knows how to create this matrix but without using any loops? a=[1 1 1 1 1 ;2 2 2 2 2 ;3 3 3 3 3 ;.......;n n n n n ] Thank you. Hana. Hana wrote: > Hi, > Anybody knows how to create this matrix but without using any loops? > a=[1 1 1 1 1 ;2 2 2 2 2 ;3 3 3 3 3 ;.......;n n n n n ] HELP REPMAT - Randy Hana wrote: > > > Hi, > Anybody knows how to create this matrix but without using any > loops? > a=[1 1 1 1 1 ;2 2 2 2 2 ;3 3 3 3 3 ;.......;n n n n n ] > > Thank you. > Hana. Hope this isn't homework. >> repmat([1:n]'...

how to "(1-3*x^2)/(1-3*x+x^2+2*x^3) => 1/(1-2*x) + x/(1-x-x^2)"?
hi normal(1/(1-2*x) + x/ (1-x-x^2),expanded); 1/(1-2*x) + x/(1-x-x^2) => (1-3*x^2)/(1-3*x+x^2+2*x^3) how to do the reverse? dillogimp@gmail.com writes: > normal(1/(1-2*x) + x/ (1-x-x^2),expanded); > 1/(1-2*x) + x/(1-x-x^2) => (1-3*x^2)/(1-3*x+x^2+2*x^3) > how to do the reverse? convert(%,parfrac,x); -- Joe Riel ...

#1 #n+1 #2n+1 #2 #n+2 #2n+2 #3 #n+3 #2n+3 #n #2n #3n #1 #2 #3 #n #n+1 #n+2 #n+3 #2n #2n+1 100 Gbps aggregate stream of 64/66b words virtual lane markers virtual lane 1 virtual lane 2 virtual lan
#1 #n+1 #2n+1 #2 #n+2 #2n+2 #3 #n+3 #2n+3 #n #2n #3n #1 #2 #3 #n #n+1 #n+2 #n+3 #2n #2n+1 100 Gbps aggregate stream of 64/66b words virtual lane markers virtual lane 1 virtual lane 2 virtual lane 3 virtual lane n Simple 66-bit word level round robin distribution Transmit PM Transmit PM Receive PM Receive PM Transmit PC Receive PC 1 0.0 1.0 0.1 0.2 0.3 1.2 1.2 1.1 0.0 1.0 0.1 1.1 2.0 3.0 4.0 6.0 7.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 17.0 18.0 19.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 1...

Changing (1,2,3,4,5...) to (1,1,2,2,3,3,4,4,5,5...)
Hi All, I have a column vector of numbers that I would like to extrapolate by "doubling up": e.g. turn 2 4 6 8 into: 2 2 4 4 6 6 8 8 any ideas on an easy vectorised way to do this? TIA, Rob v=repmat([2; 4; 6; 8].',2,1); v=v(:) "Robert Barrie" <askme@ifuwant.com> wrote in message <hlt7kp\$rut\$1@fred.mathworks.com>... > Hi All, > > I have a column vector of numbers that I would like to extrapolate by "doubling up": > > e.g. turn > 2 > 4 > 6 > 8 > > into: > 2 > 2 > 4 > 4 > 6 > 6 > 8 >...

Upgrade from VO 1 - 2 - 2..1 -2.2 - 2.3 -2.4 - 2.5 - 2.6 - 2.7
About upgrade 2.5 - 2.7 at \$ 384.00 For most products I'm using - the updates (2.0 - 2.1 - 2.7) are free... 2.0 to 3.0 might be worth + 10-30% of the original price? VO is + full price again & again - Full program price for every minor upgrade/bug-fix? I dropped out of the money/bugs [VO] at 2.5 after starting at 1.0 more than 10 years ago. Certainly whoever is making VO have to make a living; earning moneys: - that is OK! A 10 years old VO site; - 10 years later, how much have changed? http://www.yi.com/prany/cavo/cavofront.htm Even MS is not ...

Newbie question; why (cons (list 1 2) (list 3 4)) is ((1 2) 3 4) and not ((1 2) (3 4))
Hi, I just started to learn LISP, and stumbled in SICP upon (cons (list 1 2) (list 3 4)) is evaluated to ((1 2) 3 4) I do not understand why this is not: ((1 2) (3 4)) because (cdr (cons (list 1 2) (list 3 4))) is (3 4) and (car (cons (list 1 2) (list 3 4))) is (1 2) Is there a logical explanation? Thank you for your patience. -- Greg Out of order, gregor <gregor@ediwo.com> writes: > Is there a logical explanation? Yes. > I just started to learn LISP, and stumbled in SICP...

HoldForm[1*2*3] should give 1 x 2 x 3 not 2 x 3
HoldForm[] is loosing the 1* when it apparently should not: In[1]:= HoldForm[1*2*3] Out[1]= 2 x 3 In[2]:= HoldForm[1*1*1] Out[2]= 1 x 1 x 1 In[3]:= HoldForm[3*2*1] Out[3]= 3 x 2 In[4]:= HoldForm[2*2*2] Out[4]= 2 x 2 x 2 In[5]:= HoldForm[2*1*3] Out[5]= 2 x 3 In[6]:= HoldForm[1*2] Out[6]= 1 x 2 In[7]:= HoldForm[1*2*1] Out[7]= 1 x 2 x 1 Q.E.D. Indeed, the same happens with Hold and HoldComplete. I'd say this is a bug. Cheers -- Sjoerd On Feb 25, 11:07 am, "Q.E.D." <a...@netzero.net> wrote: > HoldForm[] is loosing the 1* when it...

building GCC 3.3.2 or 3.2.3 on Unixware 7.1.1
Has anybody done this successfully? I'm running into problems with the C++ library. AFAICT, the compiler is built ok (bootstrapping all succeeds), but the C++ library chokes. It seems to mostly be complaining about the 'volatile' keyword in pthread.h. I'm using binutils, btw. The ccs based build fails to bootstrap for me. Best regards, Brent Brent Eagles wrote: > Has anybody done this successfully? > > I'm running into problems with the C++ library. AFAICT, the compiler is > built ok (bootstrapping all succeeds), but the C++ library...

Why does '[1,2,3] EQ [2]' yield zero but '[1,2,3] EQ 2' yield [0,1,0] ?
Hi all, The post title says it all. I thought "everything" in IDL was an array, but using [2] and 2 with relational operators is not equivalent... I searched the doc and newsgroup for quite a while, but obviously I did not come up with search terms that are specific enough. It took me a while to track this down in some code I was writing. My bug is now fixed *but* I don't understand why exactly. And we all know voodoo and IDL don't mix :-) can somebody clarify please? Many thanks, Gianguido PS: I have a feeling this issue came up not too long ago, just couldn't find...

Re: [tao-bugs] Increase in IFR Service footprint
Hello again, Something just occurred to me. Version 1.3.1 may have pre-dated some other changes to the IFR that would certainly explain the increase in runtime footprint you are referring to. Back in December, I changed the query dispatch mechanism in the IFR from servant locator to default servant, to optimize the performance. This new mechanism creates 30-odd servants and a POA for each at IFR startup time. This was done last December. Also, regarding the possible memory leaks - these servants and POAs have their lifetimes tied to the IFR, so any Purify checks must shut down the IFR grace...

[1,2,3] exactly same as [1,2,3,] ?
x=[1,2,3] and x=[1,2,3,] are exactly the same, right? I'm generating some python data, and it's less error prone to not treat the last element specially, but I want to be sure I'm generating an equivalent data structure. Many TIA! Mark -- Mark Harrison Pixar Animation Studios mh@pixar.com wrote: > x=[1,2,3] > and > x=[1,2,3,] > > are exactly the same, right? When confronted with this type of question, I ask the interpreter: {{{ mac:~ pmcnett\$ python Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type ...

do matlab has combination fuction? for example, I want to selcet 2 numbers from 1,2,3,4,5,then I want to get following array:[1,2],[1,3],.....
undefined In article <ef33da0.-1@webx.raydaftYaTP>, dincent <accessdxt123@163.com> wrote: > undefined I might have responded to this with a reasonable answer, had you NOT posted your entire question as the subject title and left the body of the post as "undefined". Too bad. John -- The best material model of a cat is another, or preferably the same, cat. A. Rosenblueth, Philosophy of Science, 1945 Those who can't laugh at themselves leave the job to others. Anonymous ...

if time = 3 seconds, how do i set the values of the time steps 0,0.1,0.2,0.3,0.5,1.0,1.5,2.0,3.0,5.0 to -9999 from time =3 seconds
Hi &nbsp; I have 18 inputs (arrays) which contain certain statistics and if time&nbsp;&nbsp;= 3 seconds, set the values of time step 5.0 to -9999.0. &nbsp; I was wondering if there is an efficient way to do this without using a lot of case statements? &nbsp; Thank you. Hello AdrianT, it's not really clear to me what you want to do... I suspect: you have an array containing values and you want to output them with a fixed timing of 3 seconds: you should use a for loop autoindexing trough your array and sending the value to your indicator/output/whatever. Put a "wa...

why (1, 2, 3) > [1, 2, 3] is true?
I tired to google for comparison of tuple to list but i failed. Could anyone explain it to me? Best regards, fat bold cyclop fat bold cyclop, 25.02.2010 14:00: > I tired to google for comparison of tuple to list but i failed. > > Could anyone explain it to me? Both are not equal, so the comparison returns an arbitrary result in Py2. Note that this was fixed in Py3: Python 3.1.1+ (r311:74480, Nov 2 2009, 15:45:00) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> (1,2,3) > [1,2,3]...

Web resources about - how can i write this statement labels=[1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;]; in compress fo - comp.soft-sys.matlab

Resources last updated: 1/26/2016 7:19:44 PM