Info

This question is closed. Reopen it to edit or answer.

how can i rearrange the format of my array

2 views (last 30 days)
Omar Almahallawy
Omar Almahallawy on 30 Apr 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
i have a double class array
my array looks like this
HlossN =
459.3027 459.3036 459.3045 459.3053 459.3061 459.3076 459.3090 459.3103 459.3115
HlossN =
459.0832 459.0841 459.0850 459.0859 459.0867 459.0882 459.0895 459.0908 459.0920
HlossN =
458.8638 458.8647 458.8656 458.8664 458.8672 458.8687 458.8701 458.8714 458.8726
i want it to look like this
HlossN =
459.3027 459.3036 459.3045 459.3053 459.3061 459.3076 459.3090 459.3103 459.3115
459.0832 459.0841 459.0850 459.0859 459.0867 459.0882 459.0895 459.0908 459.0920
458.8638 458.8647 458.8656 458.8664 458.8672 458.8687 458.8701 458.8714 458.8726
  3 Comments
Omar Almahallawy
Omar Almahallawy on 30 Apr 2019
this is how my loop looks
LC=0:1000:320000;
for ii=1:length(LC);
HlossN=((Fn.*LC(ii).*Q.^2)./(12.*diameter.^5))
TEL=(PumpHead-HlossN+Zs)
HGL=(TEL-((V.^2)./(2.*g)))
end
actual result
FIRST ITERATION
HlossN =
674.2525 532.8942 425.8200 343.6566 279.9299 190.3355 133.1673 95.5055 70.0036
TEL =
461.1114 460.6590 460.3212 460.0877 459.8703 459.5886 459.4266 459.3134 459.2173
HGL =
460.2903 459.9835 459.7603 459.6183 459.4744 459.3011 459.2128 459.1513 459.0920
SECOND ITERATION
HlossN =
676.3662 534.5648 427.1549 344.7338 280.8074 190.9321 133.5847 95.8049 70.2230
TEL =
458.9977 458.9885 458.9863 459.0105 458.9928 458.9919 459.0091 459.0140 458.9979
HGL =
458.1767 458.3129 458.4255 458.5410 458.5968 458.7044 458.7954 458.8519 458.8726
the result i want
FIRST ITERATION
HlossN =
674.2525 532.8942 425.8200 343.6566 279.9299 190.3355 133.1673 95.5055 70.0036
TEL =
461.1114 460.6590 460.3212 460.0877 459.8703 459.5886 459.4266 459.3134 459.2173
HGL =
460.2903 459.9835 459.7603 459.6183 459.4744 459.3011 459.2128 459.1513 459.0920
SECOND ITERATION
HlossN =
676.3662 534.5648 427.1549 344.7338 280.8074 190.9321 133.5847 95.8049 70.2230
TEL =
461.1114 460.6590 460.3212 460.0877 459.8703 459.5886 459.4266 459.3134 459.2173
458.9977 458.9885 458.9863 459.0105 458.9928 458.9919 459.0091 459.0140 458.9979
HGL =
460.2903 459.9835 459.7603 459.6183 459.4744 459.3011 459.2128 459.1513 459.0920
458.1767 458.3129 458.4255 458.5410 458.5968 458.7044 458.7954 458.8519 458.8726
and so on for all the following iterations

Answers (0)

This question is closed.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!