how to connection 2 grid

조회 수: 3 (최근 30일)
vaya putra
vaya putra 2018년 7월 11일
댓글: vaya putra 2018년 7월 17일
hi i have 2 grid wc1 = W(1).cells; wc2 = W(2).cells; i want to write wc consift of w(1) and w(2) Temp = ones(size(wc))*200; vis = @(p,T, bhp) ... WI .* (rho(p(wc),T(wc))./mu(p(wc),T(wc)))
i have to calculate one by one or direct with some command?
  댓글 수: 3
vaya putra
vaya putra 2018년 7월 11일
from this command w(1).cells and w(2).cell i want to fill value as temp = one(size{w(1)+w(20)} ?
Adam Danz
Adam Danz 2018년 7월 11일
What are wc1 and wc2?
Vectors?
wc1 = [ 1 2 3 4 5];
Matrices?
wc1 = [1 2 3; 4 5 6];
And what would you like 'Temp' to be?

댓글을 달려면 로그인하십시오.

답변 (3개)

vaya putra
vaya putra 2018년 7월 11일
W is struct 2x1 consist of : w(1) = number of cell [412;422;432;442] w(2) = number of cell [512;522;532;542]
temp is temperature i want to add value in cell, i hope wc ( w(1) and w(2) ) Temp = ones (size (wc)) * 200 % 200 kelvin

Adam Danz
Adam Danz 2018년 7월 11일
편집: Adam Danz 2018년 7월 11일
If I understand you correctly, you want to combine wc1 and wc2 which are both column vectors.
Option 1:
wc1 = [412;422;432;442];
wc2 = [512;522;532;542];
wc = [wc1, wc2]
wc =
412 512
422 522
432 532
442 542
Option 2:
wc = [wc1; wc2]
wc =
412
422
432
442
512
522
532
542
  댓글 수: 2
Adam Danz
Adam Danz 2018년 7월 17일
Did this solution work for you Vaya?
vaya putra
vaya putra 2018년 7월 17일
yes it worked, thank you very much

댓글을 달려면 로그인하십시오.


vaya putra
vaya putra 2018년 7월 11일
great i will try.

카테고리

Help CenterFile Exchange에서 Complex Logic에 대해 자세히 알아보기

태그

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by