using map for dc motor instead of servo

hi dear friends i am trying to use map command which is used to power servo 180 degrees as the potentiometer move it forward (digitalWrite(I1, HIGH);
digitalWrite(I2, LOW):wink: and backward (digitalWrite(I1, HIGH);
digitalWrite(I2, LOW):wink:

val = analogRead(potpin);
val = map(val, 0, 1023, 0, 180);
myservo.write(val);

i am using normal dc motor and l293D IC but i want to control the dc as knob method like the 200 degrees please any help here i attached my urrent code
#define E1 11 // Enable Pin for motor
#define I1 10 // Control pin a for motor
#define I2 9 // Control pin b for motor
const int analogPin = A0;
int analogValue ;

void setup() {
pinMode(E1, OUTPUT);
pinMode(I1, OUTPUT);
pinMode(I2, OUTPUT);

}

void loop() {

int analogValue = analogRead(analogPin);

if(analogValue > 2 && analogValue < 500) {

analogWrite(E1, 255);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
delay(100);
} else
analogWrite(E1, 255);
digitalWrite(I1, LOW);
digitalWrite(I2, HIGH);
}

thanks in advance

The map() function is pretty simple. It maps a value from one range to another. The from range is usually pretty straightforward. For instance, an analog pin returns a value in the range 0 to 1023, so if the value to be mapped is from an analog pin, then the from range is 0 to 1023. The to range is generally pretty straightforward, too. The reason for doing the mapping is because the use of the mapped value needs it in some other range.

In your case, I can't figure out what you intend to do with the mapped value, so I can't figure out what the to range should be.