I am new to MATLAB. I am trying to plot a 2D graph showing total charge (in pC) vs. Voltage (in V) ranging from 1 to 10V. Below is my attempt which gives an empty window.
Code:
q_tot = 7.062*10^(-12);
Voltage = [1:1:10];
figure(1);
plot(q_tot, Voltage);
title('Q vs. V');
xlabel('x[m]');
ylabel('y[m]');
grid on;
You are not defining any relation between Charge and Voltage, both are independent vectors. It is missing the function that correlates both, something of the kind q_tot = f(Voltage) where "f" denotes the algebraic function where the above parameter 7.062*10^(-12) is included.