I am a new bee to tableau. I am watching the below tutorial.
http://www.tableau.com/learn/tutorials/on-demand/nested-lod-expressions?signin=85b3fd2f256e285b0f60efaf2798d48d
So in the example it is calculating (0+1+2...41)/40 and the average 20.125.I know that is wrong as it is not considering the count of customer ID. But i don't understand how it is calculating 16.25 ? PLEASE explain the mathematical formula to do if i don't want to use tableau and get 16.25 ???
Please i have been banging my head all day
This is a rather roundabout way of calculating weighted average! If, using the Distinct count of Customer ID as the weight, you get a weighted average of 16.20. Put this data into excel and see for yourself:
Col1: Number of Orders per Customer
Col 2: Avg. Nested LOD
Col 3: Distinct count of Customer ID (Weights)
Wtd. Avg =SUMPRODUCT(Col1,Col3)/SUM(Col3)
1 16.19685535 10
2 16.19685535 24
3 16.19685535 62
4 16.19685535 110
5 16.19685535 110
6 16.19685535 117
7 16.19685535 112
8 16.19685535 96
9 16.19685535 74
10 16.19685535 37
11 16.19685535 21
12 16.19685535 13
13 16.19685535 7
14 16.19685535 4
15 16.19685535 7
16 16.19685535 7
17 16.19685535 10
18 16.19685535 17
19 16.19685535 35
20 16.19685535 35
21 16.19685535 37
22 16.19685535 49
23 16.19685535 43
24 16.19685535 62
25 16.19685535 69
26 16.19685535 63
27 16.19685535 58
28 16.19685535 50
29 16.19685535 56
30 16.19685535 43
31 16.19685535 38
32 16.19685535 36
33 16.19685535 20
34 16.19685535 18
35 16.19685535 10
36 16.19685535 12
37 16.19685535 11
38 16.19685535 4
39 16.19685535 2
41 16.19685535 1
Average 20.525
Weighted Average 16.19685535
Just copy paste the data above as a text file and then open with Excel, importing it as a 'fixed width' text file.
Related
Please I need help to find the relations between these numbers , I hope if some can help me
3 22 25 30 49
1 12 27 42 47
22 37 43 44 45
8 21 25 38 50
Thank you
I have written this code in q for solving Euler 18 problem,as described in the link below, using recursion.
https://stackoverflow.com/questions/8002252/euler-project-18-approach
Though the code works, it is not efficient and gets stack overflow at pyramids of sizes greater than 3000. How could I make this code much more efficient.I believe the optimum code can be less than 30 characters.
pyr:{[x]
lsize:count x;
y:x;
$[lsize <=1;y[0];
[.ds.lastone:x[lsize - 1];
.ds.lasttwo:x[lsize - 2];
y:{{max (.ds.lasttwo)[x] +/: .ds.lastone[x],.ds.lastone[x+1]}each til count .ds.lasttwo};
$[(count .ds.lasttwo)=1;y:{max (.ds.lasttwo) +/: .ds.lastone[x],.ds.lastone[x+1]}0;y:y[]];
x[lsize - 2]:y;
pyr[-1_x]]]
}
To properly implement this logic in q you need to use adverbs.
First, to quickly find the rolling maximums you can use the prior adverb. For example:
q)input:(75;95 64;17 47 82;18 35 87 10;20 04 82 47 65;19 01 23 75 03 34;88 02 77 73 07 63 67;99 65 04 28 06 16 70 92;41 41 26 56 83 40 80 70 33;41 48 72 33 47 32 37 16 94 29;53 71 44 65 25 43 91 52 97 51 14;70 11 33 28 77 73 17 78 39 68 17 57;91 71 52 38 17 14 91 43 58 50 27 29 48;63 66 04 68 89 53 67 30 73 16 69 87 40 31;04 62 98 27 23 09 70 98 73 93 38 53 60 04 23)
q)last input
4 62 98 27 23 9 70 98 73 93 38 53 60 4 23
q)1_(|) prior last input
62 98 98 27 23 70 98 98 93 93 53 60 60 23
That last line outputs the a vector with the maximum value between each successive pair in the input vector. Once you have this you can add it to the next row and repeat.
q)foo:{y+1_(|) prior x}
q)foo[input 14;input 13]
125 164 102 95 112 123 165 128 166 109 122 147 100 54
Then, to apply this function over the whole use the over adverb:
q)foo over reverse input
,1074
EDIT: The approach above can be generalized further.
q provides a moving max function mmax. With this you can find "the x-item moving maximum of numeric y", which generalizes the use of prior above. For example, you can use this to find the moving maximum of pairs or triplets in the last row of the input:
q)last input
4 62 98 27 23 9 70 98 73 93 38 53 60 4 23
q)2 mmax last input
4 62 98 98 27 23 70 98 98 93 93 53 60 60 23
q)3 mmax last input
4 62 98 98 98 27 70 98 98 98 93 93 60 60 60
mmax can be used to simplify foo above:
q)foo:{y+1_ 2 mmax x}
What's especially nice about this is that it can be used to generalize to variants of this problem with wider triangles. For example, the triangle below has two more values on each row and from any point on a row you can move to the left, middle, or right of the row below it.
5
5 6 7
6 7 3 9 1
This question already has answers here:
Too many field references: 70613; max is 65536
(2 answers)
Closed 4 years ago.
got a problem with Facebook SDK. When i installed this i got error: Unable to convert classes into dex format.
There are installed plagins: Unity IAP 1.16, Facebook SDK 7.13.0, Google Play Service 0.9.50, Appodeal 2.8.45.
Unity 2017.1.2p3.
jdk1.8.0_181 and latest version of sdk tools
No same files or files with diffrent version there.
Here is the link for pastebin with error
CommandInvokationFailure: Unable to convert classes into dex format.
C:/Program Files/Java/jdk1.8.0_181\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Program Files (x86)/Android\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
trouble writing output: Too many field references to fit in one dex file: 86260; max is 65536.
You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large.
References by package:
3 android.accounts
30 android.app
1 android.bluetooth
2 android.content
60 android.content.pm
10 android.content.res
3 android.database
49 android.graphics
2 android.graphics.drawable
4 android.hardware
2 android.media
1 android.media.browse
4 android.net
6 android.net.wifi
28 android.os
3 android.print
4 android.provider
13 android.support.annotation
1546 android.support.compat
1546 android.support.coreui
1546 android.support.coreutils
1648 android.support.customtabs
1546 android.support.fragment
1705 android.support.graphics.drawable
1546 android.support.graphics.drawable.animated
1546 android.support.mediacompat
1546 android.support.v4
13 android.support.v4.accessibilityservice
17 android.support.v4.animation
885 android.support.v4.app
114 android.support.v4.content
1 android.support.v4.content.pm
1 android.support.v4.content.res
11 android.support.v4.graphics
41 android.support.v4.graphics.drawable
4 android.support.v4.hardware.display
12 android.support.v4.hardware.fingerprint
10 android.support.v4.internal.view
388 android.support.v4.media
379 android.support.v4.media.session
10 android.support.v4.net
19 android.support.v4.os
63 android.support.v4.print
10 android.support.v4.provider
55 android.support.v4.text
6 android.support.v4.text.util
118 android.support.v4.util
434 android.support.v4.view
138 android.support.v4.view.accessibility
8 android.support.v4.view.animation
495 android.support.v4.widget
409 android.support.v7.app
1546 android.support.v7.appcompat
1546 android.support.v7.cardview
8 android.support.v7.content.res
18 android.support.v7.graphics.drawable
1 android.support.v7.text
2 android.support.v7.transition
77 android.support.v7.view
249 android.support.v7.view.menu
856 android.support.v7.widget
6 android.text
1 android.text.util
16 android.util
22 android.view
8 android.view.accessibility
3 android.webkit
23 android.widget
2 bitter.jnibridge
158 bolts
1540 com.CODvinn.GameOfWords
1540 com.adcolony.adcolonysdk
1270 com.adcolony.sdk
1616 com.amazon.device.ads
1560 com.android.vending.billing
4 com.applovin.sdk
1037 com.appodeal.ads
128 com.appodeal.ads.a
129 com.appodeal.ads.b
80 com.appodeal.ads.c
98 com.appodeal.ads.d
174 com.appodeal.ads.e
58 com.appodeal.ads.f
146 com.appodeal.ads.g
150 com.appodeal.ads.native_ad
107 com.appodeal.ads.native_ad.views
49 com.appodeal.ads.networks
68 com.appodeal.ads.networks.a
45 com.appodeal.ads.networks.vpaid
177 com.appodeal.ads.utils
19 com.appodeal.ads.utils.a
47 com.appodeal.ads.utils.b
4 com.appodeal.ads.utils.c
1540 com.appodeal.appodeal.unity
1540 com.appodeal.inmobi.unity
1540 com.appodeal.ogury.unity
1 com.appodeal.sdk
1540 com.appodeal.startapp.unity
37 com.appodeal.unity
1540 com.appodeal.yandexmetrica.unity
31 com.appodealx.applovin
28 com.appodealx.mraid
66 com.appodealx.sdk
17 com.appodealx.vast
2 com.chartboost.sdk.Libraries
180 com.evernote.android.job
5 com.evernote.android.job.gcm
10 com.evernote.android.job.util
16 com.evernote.android.job.util.support
16 com.evernote.android.job.v14
2 com.evernote.android.job.v19
12 com.evernote.android.job.v21
3 com.evernote.android.job.v24
2 com.evernote.android.job.v26
3 com.facebook.ads
1540 com.google.android.gms
20 com.google.android.gms.actions
4 com.google.android.gms.ads
21 com.google.android.gms.ads.identifier
1594 com.google.android.gms.auth
5 com.google.android.gms.auth.account
1563 com.google.android.gms.auth.api
68 com.google.android.gms.auth.api.accounttransfer
97 com.google.android.gms.auth.api.credentials
6 com.google.android.gms.auth.api.phone
1540 com.google.android.gms.auth.api.phone.license
37 com.google.android.gms.auth.api.proxy
59 com.google.android.gms.auth.api.signin
34 com.google.android.gms.auth.api.signin.internal
1540 com.google.android.gms.auth.license
1540 com.google.android.gms.base
1540 com.google.android.gms.base.license
102 com.google.android.gms.common
98 com.google.android.gms.common.api
338 com.google.android.gms.common.api.internal
41 com.google.android.gms.common.data
44 com.google.android.gms.common.images
160 com.google.android.gms.common.internal
1540 com.google.android.gms.common.license
35 com.google.android.gms.common.stats
27 com.google.android.gms.common.util
1688 com.google.android.gms.drive
54 com.google.android.gms.drive.events
1540 com.google.android.gms.drive.license
10 com.google.android.gms.drive.metadata
20 com.google.android.gms.drive.metadata.internal
39 com.google.android.gms.drive.query
49 com.google.android.gms.drive.query.internal
8 com.google.android.gms.drive.widget
25 com.google.android.gms.dynamic
20 com.google.android.gms.dynamite
2 com.google.android.gms.dynamite.descriptors.com.google.android.gms.flags
16 com.google.android.gms.flags.impl
1915 com.google.android.gms.games
25 com.google.android.gms.games.achievement
13 com.google.android.gms.games.event
155 com.google.android.gms.games.internal
128 com.google.android.gms.games.internal.api
12 com.google.android.gms.games.internal.experience
46 com.google.android.gms.games.internal.player
61 com.google.android.gms.games.leaderboard
1540 com.google.android.gms.games.license
61 com.google.android.gms.games.multiplayer
50 com.google.android.gms.games.multiplayer.realtime
49 com.google.android.gms.games.multiplayer.turnbased
56 com.google.android.gms.games.quest
34 com.google.android.gms.games.request
46 com.google.android.gms.games.snapshot
15 com.google.android.gms.games.stats
40 com.google.android.gms.games.video
3 com.google.android.gms.iid
1518 com.google.android.gms.internal
5 com.google.android.gms.location.places
1547 com.google.android.gms.nearby
72 com.google.android.gms.nearby.connection
1540 com.google.android.gms.nearby.license
95 com.google.android.gms.nearby.messages
2 com.google.android.gms.nearby.messages.audio
163 com.google.android.gms.nearby.messages.internal
6 com.google.android.gms.security
1588 com.google.android.gms.tasks
1540 com.google.android.gms.tasks.license
1540 com.google.example.games.mainlibproj
1581 com.google.games.bridge
15 com.inmobi.a
1076 com.inmobi.ads
70 com.inmobi.ads.cache
7 com.inmobi.commons.a
39 com.inmobi.commons.core.a
24 com.inmobi.commons.core.b
13 com.inmobi.commons.core.c
62 com.inmobi.commons.core.configs
10 com.inmobi.commons.core.d
43 com.inmobi.commons.core.e
12 com.inmobi.commons.core.f
66 com.inmobi.commons.core.network
29 com.inmobi.commons.core.utilities
6 com.inmobi.commons.core.utilities.a
37 com.inmobi.commons.core.utilities.b
10 com.inmobi.commons.core.utilities.uid
160 com.inmobi.rendering
53 com.inmobi.rendering.a
83 com.inmobi.rendering.mraid
29 com.inmobi.sdk
104 com.inmobi.signals
10 com.inmobi.signals.a
13 com.inmobi.signals.activityrecognition
14 com.inmobi.signals.b
53 com.integralads.avid.library.adcolony
2 com.integralads.avid.library.adcolony.activity
2 com.integralads.avid.library.adcolony.base
4 com.integralads.avid.library.adcolony.processing
5 com.integralads.avid.library.adcolony.registration
3 com.integralads.avid.library.adcolony.session
45 com.integralads.avid.library.adcolony.session.internal
19 com.integralads.avid.library.adcolony.session.internal.jsbridge
12 com.integralads.avid.library.adcolony.session.internal.trackingwebview
14 com.integralads.avid.library.adcolony.utils
26 com.integralads.avid.library.adcolony.video
14 com.integralads.avid.library.adcolony.walking
21 com.integralads.avid.library.adcolony.walking.async
1 com.integralads.avid.library.adcolony.weakreference
53 com.integralads.avid.library.inmobi
2 com.integralads.avid.library.inmobi.activity
2 com.integralads.avid.library.inmobi.base
4 com.integralads.avid.library.inmobi.processing
5 com.integralads.avid.library.inmobi.registration
3 com.integralads.avid.library.inmobi.session
45 com.integralads.avid.library.inmobi.session.internal
19 com.integralads.avid.library.inmobi.session.internal.jsbridge
12 com.integralads.avid.library.inmobi.session.internal.trackingwebview
14 com.integralads.avid.library.inmobi.utils
26 com.integralads.avid.library.inmobi.video
14 com.integralads.avid.library.inmobi.walking
21 com.integralads.avid.library.inmobi.walking.async
1 com.integralads.avid.library.inmobi.weakreference
2 com.ironsource.mediationsdk
218 com.moat.analytics.mobile.inm
2 com.moat.analytics.mobile.inm.a.b
1 com.mobvista.msdk
1 com.squareup.okhttp
345 com.squareup.picasso
6 com.startapp.a.a.a
4 com.startapp.a.a.b
32 com.startapp.a.a.c
7 com.startapp.a.a.d
5 com.startapp.a.a.e
3 com.startapp.a.a.f
13 com.startapp.a.a.g
3 com.startapp.android.publish
6 com.startapp.android.publish.a
45 com.startapp.android.publish.ads.a
9 com.startapp.android.publish.ads.b
55 com.startapp.android.publish.ads.banner
87 com.startapp.android.publish.ads.banner.banner3d
35 com.startapp.android.publish.ads.banner.bannerstandard
2 com.startapp.android.publish.ads.c.a
5 com.startapp.android.publish.ads.c.b
111 com.startapp.android.publish.ads.list3d
49 com.startapp.android.publish.ads.nativead
123 com.startapp.android.publish.ads.splash
146 com.startapp.android.publish.ads.video
12 com.startapp.android.publish.ads.video.a
31 com.startapp.android.publish.ads.video.b
48 com.startapp.android.publish.ads.video.tracking
338 com.startapp.android.publish.adsCommon
31 com.startapp.android.publish.adsCommon.Utils
25 com.startapp.android.publish.adsCommon.a
7 com.startapp.android.publish.adsCommon.activities
26 com.startapp.android.publish.adsCommon.adListeners
90 com.startapp.android.publish.adsCommon.adinformation
11 com.startapp.android.publish.adsCommon.b
8 com.startapp.android.publish.adsCommon.c
10 com.startapp.android.publish.adsCommon.d
48 com.startapp.android.publish.adsCommon.e
13 com.startapp.android.publish.adsCommon.f
11 com.startapp.android.publish.adsCommon.g
105 com.startapp.android.publish.cache
163 com.startapp.android.publish.common.metaData
121 com.startapp.android.publish.common.model
17 com.startapp.android.publish.html
40 com.startapp.android.publish.inappbrowser
42 com.startapp.common
54 com.startapp.common.a
3 com.startapp.common.b
3 com.startapp.common.c
1546 com.unity.purchasing
34 com.unity.purchasing.common
1724 com.unity.purchasing.googleplay
1 com.unity3d.ads
1 com.unity3d.ads2
203 com.unity3d.player
2 com.vungle.warren
212 com.yandex.metrica
455 com.yandex.metrica.impl
18 com.yandex.metrica.impl.interact
924 com.yandex.metrica.impl.ob
29 com.yandex.metrica.impl.utils
3 com.yandex.mobile.ads
364 for
21 for.do
26 for.do.byte
8 for.do.case
12 for.do.char
46 for.do.do
23 for.do.for
43 for.do.if
26 for.do.int
177 for.do.new
1 for.do.try
63 if.do.do
3 if.do.do.for
82 if.do.do.if
111 if.do.do.if.do
39 if.do.do.int
71 int
135 io.presage
47 io.presage.actions
8 io.presage.actions.do
6 io.presage.activities
24 io.presage.activities.do
12 io.presage.activities.handlers
73 io.presage.ads
10 io.presage.ads.controller
35 io.presage.byte
14 io.presage.case
76 io.presage.char
27 io.presage.char.do
26 io.presage.else
44 io.presage.else.do
16 io.presage.finder
56 io.presage.finder.model
14 io.presage.flatbuffers
7 io.presage.for
47 io.presage.formats
45 io.presage.formats.multiwebviews
13 io.presage.formats.multiwebviews.video
8 io.presage.goto
17 io.presage.helper
8 io.presage.if
2 io.presage.int
59 io.presage.long
22 io.presage.long.do
27 io.presage.model
15 io.presage.new
32 io.presage.provider
9 io.presage.receiver
35 io.presage.this
20 io.presage.try
2 java.io
15 java.lang
11 java.lang.annotation
5 java.net
2 java.nio
6 java.util
6 java.util.concurrent
5 java.util.logging
1 javax.xml.xpath
14 net.vrallev.android.cat
3 net.vrallev.android.cat.instance
1 org.apache.http.conn.ssl
20 org.fmod
1 org.json
8 org.nexage.sourcekit
239 org.nexage.sourcekit.mraid
14 org.nexage.sourcekit.mraid.internal
6 org.nexage.sourcekit.mraid.nativefeature
18 org.nexage.sourcekit.mraid.properties
36 org.nexage.sourcekit.util
40 org.nexage.sourcekit.vast
139 org.nexage.sourcekit.vast.activity
114 org.nexage.sourcekit.vast.model
6 org.nexage.sourcekit.vast.processor
22 org.nexage.sourcekit.vast.view
]
stdout[
processing archive C:\Users\ZaAz\Desktop\GameOfWords2017\GameOfWords2017\Temp\StagingArea\android-libraries\GoogleAIDL\libs\.\classes.jar...
processing com/android/vending/billing/BuildConfig.class...
processing com/android/vending/billing/IInAppBillingService.class...
processing com/android/vending/billing/IInAppBillingService$Stub.class...
processing com/android/vending/billing/IInAppBillingService$Stub$Proxy.class...
processing archive C:\Users\ZaAz\Desktop\GameOfWords2017\GameOfWords2017\Temp\StagingArea\android- libraries\GooglePlay\libs\.\classes.jar...
processing com/unity/purchasing/googleplay/ActivityLauncher.class...
processing com/unity/purchasing/googleplay/BillingServiceManager.class...
processing com/unity/purchasing/googleplay/BillingServiceManager$1.class...
processing com/unity/purchasing/googleplay/BillingServiceManager$1$1.class...
processing com/unity/purchasing/googleplay/BillingServiceManager$1$2.class...
processing com/unity/purchasing/googleplay/BillingServiceManager$2.class...
processing com/unity/purchasing/googleplay/BillingServiceProcessor.class...
processing com/unity/purchasing/googleplay/BuildConfig.class...
processing com/unity/purchasing/googleplay/Consts.class...
processing com/unity/purchasing/googleplay/Consts$PurchaseState.class...
processing com/unity/purchasing/googleplay/Consts$ResponseCode.class...
processing com/unity/purchasing/googleplay/GooglePlayBillingUnAvailableException.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$1.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$2.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$3.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$4.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$5.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$6.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$7.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$Features.class...
processing com/unity/purchasing/googleplay/IActivityLauncher.class...
processing com/unity/purchasing/googleplay/IBillingServiceManager.class...
processing com/unity/purchasing/googlep<message truncated>
I had the same problem a few days ago. This is your error:
Too many field references to fit in one dex file: 86260; max is 65536.
The plugins you are using all have their own dex files and the combined size, especially while using something like GooglePlayGames, can ramp up quickly.
You can bypass this by switching your build type in Build Settings from Internal to Gradle.
If you are still not able to build it correctly, you may want to consider removing some Plugins if you can. (I understand this is probably not your desired approach).
I ended up removing the GooglePlayGames Plugin, which was also slowing my build and app down.
I just received a large data array of random numbers. 20 numbers per line, 600,000 lines in a CSV file. The numbers are separated by a space instead of a comma thus postgresql reads it as one long string per line and I cannot insert the proper data attribute for the data.
Each set of numbers will have a unique id. Each number is 2 digits long. I want the ability to count the amount of times a certain number was entered. Get the frequency of each number between certain ID's.
My question:
What data type should I use to insert the data so it is recognized as integers instead of text?
How do I replace the space with a comma?
Do I need to replace the space with a comma?
Currently running Postgres 9.6, PgAdmin 4.
Bonus if answer is provided in PgAdmin as well.
Also here is a sample
Excel
Numbers
06 18 20 21 24 32 36 40 44 47 50 52 55 57 60 61 62 68 72 79
03 05 12 13 14 16 17 18 24 28 33 34 35 39 44 55 62 63 64 67
09 10 12 13 15 25 30 31 36 42 43 44 46 48 51 57 65 69 75 79
08 12 15 20 27 33 34 37 41 43 44 45 54 55 60 61 66 70 72 76
CSV FILE
Numbers06 18 20 21 24 32 36 40 44 47 50 52 55 57 60 61 62 68 72 79
03 05 12 13 14 16 17 18 24 28 33 34 35 39 44 55 62 63 64 67
09 10 12 13 15 25 30 31 36 42 43 44 46 48 51 57 65 69 75 79
08 12 15 20 27 33 34 37 41 43 44 45 54 55 60 61 66 70 72 76
or the file with the id numbers
CSV
ID, Numbers
1253842,06 18 20 21 24 32 36 40 44 47 50 52 55 57 60 61 62 68 72 79
1253843,03 05 12 13 14 16 17 18 24 28 33 34 35 39 44 55 62 63 64 67
1253844,09 10 12 13 15 25 30 31 36 42 43 44 46 48 51 57 65 69 75 79
1253845,08 12 15 20 27 33 34 37 41 43 44 45 54 55 60 61 66 70 72 76
1253846,04 06 07 09 11 12 13 14 18 20 21 26 30 36 37 41 43 48 74 79
1253847,01 11 14 15 35 37 38 43 46 48 49 51 53 57 64 65 66 70 76 77
1253848,01 03 14 17 20 22 24 25 38 42 46 54 56 57 60 61 66 72 78 80
Here's the error message
>
ERROR: malformed array literal: "06 18 20 21 24 32 36 40 44 47 50 52 55 57 60 61 62 68 72 79"
DETAIL: Array value must start with "{" or dimension information.
CONTEXT: COPY Quick numbers, line 2, column numbers : "06 18 20 21 24 32 36 40 >44 47 50 52 55 57 60 61 62 68 72 79"
What's the fastest way to create a 8x8 matrix filled with 1-64 by row. The help docs say i should even be able to fill a matrix with an array, but i can't seem to make it work. I've been told it can be done more easily than i do it, but I've not seen it done. Here's an idea of what i'm looking for...
v26 =
1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24
25 26 27 28 29 30 31 32
33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48
49 50 51 52 53 54 55 56
57 58 59 60 61 62 63 64
but to get it to do this, I had to do a row-by-row fill with ...
v26 = [1:8; 9:16; 17:24; 25:32; 33:40; 41:48; 49:56; 57:64]
make a sequence, then you reshape it:
m = reshape(1:64, [8 8])';
You have to transpose it in the end b/c matlab is column major.