How do I solve this issue, Error using vertcat Dimensions of arrays being concatenated are not consistent. Error in (line 22) A = [G1 +G2 +G3 -G1 -G2;
Mostra commenti meno recenti
clear
% MATLAB Componets Values
m = 10^-3
k = 10^3
Is = 2*m
Vs = 6
R1 = 1*k
R2 = 2*k
R3 = 3*k
R4 = 4*k
% MATLAB Solve for Vs, V1, and Vo
G1 = 1/R1
G2 = 1/R2
G3 = 1/R3
G4 = 1/R4
A = [G1 +G2 +G3 -G1 -G2;
G2 -G2 +G4]
B = [Is;
0]
x = inv(A)*B
V1 = x(1)
V0 = x(2)
Risposte (1)
Image Analyst
il 8 Feb 2025
0 voti
Your top row of A has 5 elements (columns) and you're trying to put a row under it that has only 3 elements (columns). You can't put a 3-element vector underneath a 5-element vector. All rows must have the same number of columns.
Categorie
Scopri di più su Statistics and Machine Learning Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!