Please your help is needed so that i can fprint results of a matrix(say matrix M) at each iteration of a for loop.
7 views (last 30 days)
Show older comments
Please your help is needed so that i can fprint results of a matrix(say matrix M) at each iteration of a for loop. Because i want to work with a particular matrix of all the iterations and i want to know at what iteration that such matrix occurred. Many thanks in advance.
3 Comments
Answers (4)
Image Analyst
on 19 Apr 2018
Just put the name of the matrix on its own line without a semicolon in your loop
for k = 1 : whatever matrixName end
It will print to the command window. Or you can use fprintf():
for row = 1 : size(m, 1) fprintf('%f ', m(row, :)); fprintf('\n'); end
7 Comments
Image Analyst
on 22 Apr 2018
Edited: Image Analyst
on 22 Apr 2018
It might be easier if you just provided us with the full code rather than partial snippets. Attach any data that needs to be read in.
To format your code read this link
Before you paste in here, type control-a, control-i, in the MATLAB editor, to fix up your indenting.
Mini
on 19 Apr 2018
Hope Peju is aware of file operation commands. Pls find the attached sample file. Check the ab.op file for the results.
Edik Manoukian
on 18 Apr 2020
Problem 1 Consider the feeder in the following figure. The substation transformer is connected to an infinite bus. The infinite bus voltages (i.e. the substation primary voltages) are balanced and being held at 69 kV for all power-flow problems. The substation transformer ratings are: 5000 kVA, 69 kV delta – 13.8 kV grounded Y, Z = 1.7 + j8.5 % The phase impedance matrix for a four-wire wye line between Node 2-3 is The four-wire wye feeder between Node 2-3 is 0.75 miles long. An unbalanced wye-connected load is located at node 3 and has the following values: Phase a: 650 kVA at 0.85 lagging power factor Phase b: 500 kVA at 0.90 lagging power factor Phase c: 950 kVA at 0.95 lagging power factor Assuming that the regulators are in the neutral position: 1) Determine the forward and backward sweep matrices for the substation transformer and the line segment. 2) Use the modified ladder technique to determine the line-to-ground voltages at all nodes. Use a tolerance of 0.0001 per unit. 3) Calculate all node voltages in actual values in volts and on a 120-V base.
0 Comments
Edik Manoukian
on 18 Apr 2020
Three type B step-voltage regulators are installed in a wye connection at the substation in order to hold the load voltages (node 3) at a voltage level of 121 V and a bandwidth of 2 V. 1) Compute the actual equivalent line impedance between nodes 2 and 3. 2) Determine a potential transformer ratio and current transformer ratio given that the compensator circuit ratings are 120V and 5A. Determine the R and X compensator settings calibrated in volts and Ohms. The settings must be the same for all three regulators. 3) For the load conditions of Problem 1 with the regulators in the neutral position, compute the voltages across the voltage relays in the compensator circuits. 4) Determine the appropriate tap settings for the three regulators to hold the node 3 voltages at 121 V in a bandwidth of 2 V. 5) With the regulators taps set, compute the actual load voltages in volts and in per unit.
0 Comments
See Also
Categories
Find more on Phase-Locked Loops 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!