Emulating a memristor using arduino uno, but my code is for an arduino due..

I wanted to ask if their was a big difference in between the coding for an arduino uno and arduino due

#include <SPI.h> 
// Define I/O pins 
#define SLAVESELECT 4 // set pin 4 as the slave select for the digital potentiometer 
// opcodes 
#define WRITE_W0 0 
#define WRITE_W1 16 
#define init_W0 230 // The MCP4151 default wiper position is in the mid- sacale so we initialise both wiper position to a resistance equivalent to Rinit right in the setup code 

#define init_W1 0 
#define init_state 128 // initial resistance can go from 1 - 255 
// Memristor parameter definition and default values
const double Ron = 2000.0;
const double Roff = 50000.0;
const double D = 0.000000001; 
float VT = 0.2;
const double uv = 0.0000000000001;
double dwdt;
double dw;
double w;
double Imem;
double Imessage;
double Vmem;
double wlast;
double winit;
double Number;
double dt = 0.000015;
double Rinit = 45000.0;
double Rmem;
int N; 
int Rw = 75;
long Iteration = 0;
double J = 1.0; 
double p_coeff = 2.0;
double sign_multiply;
double noise = 0.00000000000000001;
int POBVoltageValue; 
int WiperVoltageValue;
double POBvoltage;
double Wipervoltage; 

void setup() {
//put your setup code here, to run once; 
pinMode(A0, INPUT); 
pinMode(A1, INPUT); 
pinMode (A4, OUTPUT);
pinMode(A5, OUTPUT);
//SPI.begin (SLAVESELECT); // initialize SPI: 
Serial.begin(9600); // initialize serial communication at 9600 bits per second:
Serial.write('\n'); // debug
// set initial wiper condition (Rinit)
digitalPotWrite (WRITE_W0, init_W0);
// change the arduino Due ADC/DAC resoultion to 12 bits 
int analogReadResolution(12); 
int analogWriteResolution(12);
analogWrite(A4, 2047);
dw=(uv * Ron)/D;
winit=D/10;
wlast=winit; 
Rmem=Rinit;
}
void loop (){ 
if (Iteration == 0){
  digitalPotWrite(WRITE_W0, init_W0);
  }
Iteration++;
//read the inputu on analog pin 0 and 1; 
POBVoltageValue=analogRead(A0); 
WiperVoltageValue= analogRead(A1);
//Convert the analog reading ( which goes from 0 - 4095) to a voltage (0 - 3.3V); 
POBvoltage=POBVoltageValue*(3.3/4095.0);
Wipervoltage=WiperVoltageValue*(3.3/4095.0);
Vmem=Wipervoltage-POBvoltage;
Imem = Vmem/Rmem;
Imessage= 1000000.0*Imem; 
dwdt=dw*Imem;
if(func(Imem)==1){
  sign_multiply=0.0;
if(w==0){
  sign_multiply=1.0;}
  }
if(func(Imem)==-1){
  sign_multiply=0.0;
if(w==D){sign_multiply=-1.0;
}
}
if((abs(Vmem))<VT){
  w=wlast;
  }
else{
  w=dwdt*dt*J*(1-(pow(pow((w/D)-0.5,2)+0.75,
p_coeff)))+wlast+(sign_multiply*noise);
}
if(w>=D){
  w=D;
  }
if(w<=0){
  w=0;
  }
Rmem=(Ron*(w/D)+Roff*((1-w)/D));
wlast=w;
Number=(((Rmem-Rw)*256)/Roff);
N=round(Number);
digitalPotWrite(WRITE_W0,N);
TimePlot(Imessage,"Current","I");
Serial.println("{TIMEPLOT:I | set | title=Curent}");
Serial.println("{TIMEPLOT:I | set | x-label=Time}");
Serial.println("{TIMEPLOT:I | set | y-label=I(uA)}");
TimePlot(Vmem, "Input_Voltage","V");
Serial.println("{TIMEPLOT:I | set | title=Voltage}");
Serial.println("{TIMEPLOT:I | set | x-label=Time}");
Serial.println("{TIMEPLOT:I | set | y-label=V(V)}");
XYPlot(Vmem,Imessage, "i-v","i-curve");
Serial.println("{XYPLOT:curve | set | title=i-v}");
Serial.println("{XYPLOT:curve | set | x-label=V(V)}");
Serial.println("{XYPLOT:curve | set | Y-label=I(uA)}");
}
int func(double arg){
int sign;
sign=(arg >=0.0?1:-1);
return sign ;
}
void digitalPotWrite(int command, int value){
SPI.transfer(SLAVESELECT, command);
SPI.transfer(SLAVESELECT, value);
}
void TimePlot(float data, String seriesName, String channelName){
Serial.print ("{TIMEPLOT:"); 
Serial.print (channelName); 
Serial.print("|data|");
Serial.print(seriesName);
Serial.print("|T|");
Serial.print(data, 3);
Serial.println("}");
}
void XYPlot( float xData, float yData,String seriesName,String channelName){
Serial.print("{XYPLOT:");
Serial.print(channelName); 
Serial.print("| data |");
Serial.print(seriesName); 
Serial.print("|");
Serial.print(xData); 
Serial.print("|");
Serial.print(yData); 
Serial.println("}");  
}

These are my four errors also received when running the code

/Users/nas.the.rapper/Downloads/Code/Code.ino: In function 'void digitalPotWrite(int, int)':
/Users/nas.the.rapper/Downloads/Code/Code.ino:123:34: warning: invalid conversion from 'int' to 'void*' [-fpermissive]
 SPI.transfer(SLAVESELECT, command);

                                  ^
In file included from /Users/nas.the.rapper/Downloads/Code/Code.ino:1:0:
/Users/nas.the.rapper/Desktop/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SPI/src/SPI.h:244:22: note:   initializing argument 1 of 'static void SPIClass::transfer(void*, size_t)'
   inline static void transfer(void *buf, size_t count) {
                      ^
/Users/nas.the.rapper/Downloads/Code/Code.ino:124:32: warning: invalid conversion from 'int' to 'void*' [-fpermissive]
 SPI.transfer(SLAVESELECT, value);

                                ^
In file included from /Users/nas.the.rapper/Downloads/Code/Code.ino:1:0:
/Users/nas.the.rapper/Desktop/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SPI/src/SPI.h:244:22: note:   initializing argument 1 of 'static void SPIClass::transfer(void*, size_t)'
   inline static void transfer(void *buf, size_t count) {
                      ^
Sketch uses 7160 bytes (22%) of program storage space. Maximum is 32256 bytes.
Global variables use 600 bytes (29%) of dynamic memory, leaving 1448 bytes for local variables. Maximum is 2048 bytes.

I wanted to ask if their was a big difference in between the coding for an arduino uno and arduino due

No, and yes. The DUE has hardware that the UNO does not, like a true variable voltage output. That code is expecting that hardware to exist.

These are my four errors also received when running the code

You can't run code that won't compile.

int func(double arg){
int sign;
sign=(arg >=0.0?1:-1);
return sign ;
}

What a waste, using 4 bytes to get one bit of information.

/Users/nas.the.rapper/Downloads/Code/Code.ino: In function 'void digitalPotWrite(int, int)':
/Users/nas.the.rapper/Downloads/Code/Code.ino:123:34: warning: invalid conversion from 'int' to 'void*' [-fpermissive]
 SPI.transfer(SLAVESELECT, command);

RTFM: SPI.transfer

Thanks for the help