Error using sym/subsindex , Error in sym/subsref
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
syms Ybus k n V i N;
V(k,i) = (1/Ybus(k,k))*((conj(S(k)))/(conj(V(k,i)))-(symsum(Ybus(k,n)*V(n,i+1),n,1,k-1)) -(symsum(Ybus(k,N)*V(N,i),n,k+1,N)));
Error using sym/subsindex (line 855)
Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be symbolic variables, and function body must be sym
expression.
Error in sym/subsref (line 900)
R_tilde = builtin('subsref',L_tilde,Idx);
Error in hmw (line 28)
V(k,i) = (1/Ybus(k,k))*((conj(S(k)))/(conj(V(k,i)))-(symsum(Ybus(k,n)*V(n,i+1),n,1,k-1)) -(symsum(Ybus(k,N)*V(N,i),n,k+1,N)));
Where is the problem ?
0 Commenti
Risposte (1)
Ameer Hamza
il 15 Mag 2020
You are using Ybus, S, and V as functions, however, you defined them as simple symbolic variables. Try this
syms Ybus(k,n) V(k,i) N S(k)
V(k,i) = (1/Ybus(k,k))*((conj(S(k)))/(conj(V(k,i)))-(symsum(Ybus(k,n)*V(n,i+1),n,1,k-1)) -(symsum(Ybus(k,N)*V(N,i),n,k+1,N)));
Also, here you are defining V(k,i) in terms of V(k,1). It appears there might be a logical error. Can you show the equation you are trying to implement?
0 Commenti
Vedere anche
Categorie
Scopri di più su Calculus in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!