This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Figure を 1024x768 のPNG形式で | |
% "fig.png" に保存する例 | |
width = 1024; | |
height = 768; | |
set(gcf,'PaperPositionMode','auto') | |
pos=get(gcf,'Position'); | |
pos(3)=width-1; % なぜか幅が1px増えるので対処 | |
pos(4)=height; | |
set(gcf,'Position',pos); | |
print('-r0','-dpng','fig.png'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import numpy | |
infile="norain.png" | |
outfile="norain.bin" | |
img = Image.open(infile) | |
print(img.size) | |
pix= img.load() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using Microsoft.SPOT; | |
using Microsoft.SPOT.Hardware; | |
namespace Maruta | |
{ | |
/// <summary> | |
/// This class is a driver for the color 128x128 OLED display referenced SSD1351. | |
/// http://www.adafruit.com/products/1431 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ tfobj ] = sym2tf( symobj, Ts) | |
% SYM2TF convert symbolic math rationals to transfer function | |
if isnumeric(symobj) | |
tfobj=symobj; | |
return; | |
end | |
[n,d]=numden(symobj); | |
num=sym2poly(n); |
NewerOlder