Error with multiplication, it saids that matrix dimensions must be equal, How do I multiply in my formulas?
Show older comments
Every time I run the program, I get an error when the program calculates Vc. The error states the matrix dimensions must agree, I was wondering how to fix this so my formula works correctly. Error still happens when I remove the dot from multiplication sign. I've asked my professor but he doesn't recognize why the error is happening. Respond ASAP please, as I was given this friday and the report is due sunday.
%time the switch is closed for
t = 0:1:10;
%User enters the values for E, R, C.
e = exp(-t/R*C);
dvc = E - VcO; %Vc then letter "O"
%Formulas for Vc, ic, Vr
Vc = E + ((VcO - E).* e);
ic = (dvc/R).*e;
Vr = dvc .* e;
Accepted Answer
More Answers (1)
Adam
on 9 Nov 2014
0 votes
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!