Tag Info

New answers tagged

2

Assuming the file datagr.xls contains your data, import it using importeddata = Import["datagr.xls"][[1]]; and construct the edge list using Apply (@@@) edgelist = {DirectedEdge, UndirectedEdge}[[1 + #3]][#, #2] & @@@ importeddata alternatively, edgelist = If[#3==0, DirectedEdge[#,#2], UndirectedEdge[#,#2]]& @@@ importeddata or Map ...


3

The Wolfram Mathematica Control is the COM footprint of the CDF Player Internet Explorer plug-in. Here is the information page for the plug-in from the Internet Explorer Add-on Manager: The registry entries for the DLL are as is typical for Internet Explorer plug-ins, especially the EnableFullPage and Implemented Categories keys. The type library ...


10

Using SE as my rubber duck to organize ideas worked just nice. I found the answer in NETLinkUserGuide. To get current Excel session use GetActiveCOMObject instead of CreateCOMObject. Here is a code example. Needs["NETLink`"] InstallNET[] excel=GetActiveCOMObject["Excel.Application"] workbook=excel@Workbooks["MySpreadsheet.xlsx"]; ...


0

In your first line of your code the variable a is assigned the string ["/Users/pedrofonsecazuccolo...." and then trying to use the Part function that is a[[1,Range[1,19],2]] which indeed is a wrong part specification for the string. Probably you intended dados[[1,Range[1,19],2]], which would take a Part from the data retrieved by Import[a] and assigned to ...


2

First of all I think that one function definition is ok: f[c1_,c2_,p_,n_,i_]:= Sum[ Binomial[n,j] p^j (1-p)^(n-j), {j,0,c1}] + Sum[ Binomial[n,j] p^j (1-p)^(n-j+n i), {j,c1+1,c2}] Then use the k_v's answer in the form t=Flatten[ Table[ If[(a=f[c1, c2, 0.01, n, 5])≥0.95 && (b=f[c1, c2, 0.05, n, 5])≤0.05, ...


2

You can generate a full Table of values as you stated myTable = Table[ {c1, c2, n, f1[c1, c2, 0.01, n, 5], f2[c1, c2, 0.05, n, 5]}, {c1, 0, 4, 1}, {c2, c1 + 1, 6, 1}, {n, 175, 185} ]; Then make a selection of the values you wish using Select, Partition and Flatten mySelection = Select[ Partition[Flatten[myTable], 5], #[[4]] >= 0.95 ...


2

firs of all there's no need to use nested Table, and you may use values selection directly inside the table evaluation t=Table[ If[f1[c1, c2, 0.01, n, 5]≥0.95 && f2[c1, c2, 0.05, n, 5]≤0.05, {f1[c1, c2, 0.01, n, 5], f2[c1, c2, 0.05, n, 5]}], {c1, 0, 4, 1}, {c2, c1 + 1, 6, 1}, {n, 175, 185}]/.Null->Sequence[]/.{}-> Sequence[] this way let ...



Top 50 recent answers are included