File tree Expand file tree Collapse file tree 2 files changed +87
-13
lines changed Expand file tree Collapse file tree 2 files changed +87
-13
lines changed Original file line number Diff line number Diff line change 340
340
"collapsed" : false ,
341
341
"input" : [
342
342
" %%matlab -i a -o b\n " ,
343
- " b = a + 3 "
343
+ " b = [a;a] "
344
344
],
345
345
"language" : " python" ,
346
346
"metadata" : {},
351
351
" \n " ,
352
352
" b =\n " ,
353
353
" \n " ,
354
- " 4 5 6\n " ,
354
+ " 1 2 3\n " ,
355
+ " 1 2 3\n " ,
355
356
" \n "
356
357
]
357
358
}
358
359
],
359
- "prompt_number" : 6
360
+ "prompt_number" : 16
360
361
},
361
362
{
362
363
"cell_type" : " code" ,
369
370
"outputs" : [
370
371
{
371
372
"output_type" : " pyout" ,
372
- "prompt_number" : 7 ,
373
+ "prompt_number" : 17 ,
373
374
"text" : [
374
- " array([4, 5, 6])"
375
+ " array([[1, 2, 3],\n " ,
376
+ " [1, 2, 3]])"
375
377
]
376
378
}
377
379
],
378
- "prompt_number" : 7
380
+ "prompt_number" : 17
379
381
},
380
382
{
381
383
"cell_type" : " code" ,
Original file line number Diff line number Diff line change 43
43
"output_type" : " stream" ,
44
44
"stream" : " stdout" ,
45
45
"text" : [
46
- " Starting MATLAB on http://localhost:59735\n "
46
+ " Starting MATLAB on http://localhost:62161\n "
47
+ ]
48
+ },
49
+ {
50
+ "output_type" : " stream" ,
51
+ "stream" : " stdout" ,
52
+ "text" : [
53
+ " ."
54
+ ]
55
+ },
56
+ {
57
+ "output_type" : " stream" ,
58
+ "stream" : " stdout" ,
59
+ "text" : [
60
+ " ."
61
+ ]
62
+ },
63
+ {
64
+ "output_type" : " stream" ,
65
+ "stream" : " stdout" ,
66
+ "text" : [
67
+ " ."
68
+ ]
69
+ },
70
+ {
71
+ "output_type" : " stream" ,
72
+ "stream" : " stdout" ,
73
+ "text" : [
74
+ " ."
75
+ ]
76
+ },
77
+ {
78
+ "output_type" : " stream" ,
79
+ "stream" : " stdout" ,
80
+ "text" : [
81
+ " ."
82
+ ]
83
+ },
84
+ {
85
+ "output_type" : " stream" ,
86
+ "stream" : " stdout" ,
87
+ "text" : [
88
+ " ."
89
+ ]
90
+ },
91
+ {
92
+ "output_type" : " stream" ,
93
+ "stream" : " stdout" ,
94
+ "text" : [
95
+ " ."
96
+ ]
97
+ },
98
+ {
99
+ "output_type" : " stream" ,
100
+ "stream" : " stdout" ,
101
+ "text" : [
102
+ " ."
47
103
]
48
104
},
49
105
{
303
359
" res_dict = matlab.run_code('a=[1,3,7]')\n " ,
304
360
" res_dict = matlab.run_code('plot(a)')\n " ,
305
361
" res_dict = matlab.run_code('b=a+1')\n " ,
306
- " aa = matlab.get_variable('b')['var'] \n " ,
307
- " aa "
362
+ " exec('this=np.array(%s)'% matlab.get_variable('b')) \n " ,
363
+ " this "
308
364
],
309
365
"language" : " python" ,
310
366
"metadata" : {},
311
- "outputs" : [],
312
- "prompt_number" : " *"
367
+ "outputs" : [
368
+ {
369
+ "output_type" : " pyout" ,
370
+ "prompt_number" : 3 ,
371
+ "text" : [
372
+ " array([2, 4, 8])"
373
+ ]
374
+ }
375
+ ],
376
+ "prompt_number" : 3
313
377
},
314
378
{
315
379
"cell_type" : " code" ,
390
454
},
391
455
{
392
456
"output_type" : " pyout" ,
393
- "prompt_number" : 4 ,
457
+ "prompt_number" : 37 ,
394
458
"text" : [
395
459
" True"
396
460
]
397
461
}
398
462
],
399
- "prompt_number" : 4
463
+ "prompt_number" : 37
464
+ },
465
+ {
466
+ "cell_type" : " code" ,
467
+ "collapsed" : false ,
468
+ "input" : [],
469
+ "language" : " python" ,
470
+ "metadata" : {},
471
+ "outputs" : []
400
472
}
401
473
],
402
474
"metadata" : {}
You can’t perform that action at this time.
0 commit comments