MATLAB Answers

# how to plot array ? i am using display instruction but i m not able to plot that data on xy plane

1 view (last 30 days)
Arif Sayyad on 24 Jan 2020
Commented: Arif Sayyad on 24 Jan 2020
disp(' L W pf_n L_W ');
for pf_n=0.35:0.05:0.5
for ac=10000.0:10000.0:50000.0
C =[(1.11*Bavg*ac*Kw*pf_n)];
vs=vr/(1-s);
%[formula: L*W=Q/(C*vs) & L/W=P]
%[let J=L*W, K=L/W]
L_W=Q/(C*vs);
W=sqrt(L_W/P);
L=P*W;
display([L',W',pf_n',L_W'])
end
end

#### 2 Comments

Bhaskar R on 24 Jan 2020
Can you specify what are input values and which variables you need to plot?
Arif Sayyad on 24 Jan 2020
i want to plot (L_W,ac)
plot(L_W,pf_n) ;

Sign in to comment.

### Accepted Answer

Walter Roberson on 24 Jan 2020
Edited: Walter Roberson on 24 Jan 2020
pf_n = 0.35:0.05:0.5;
ac = (10000.0:10000.0:50000.0).';
C = (1.11 .* Bavg .* ac .* Kw .* pf_n);
vs = vr./(1-s);
L_W = Q./(C.*vs);
W = sqrt(L_W./P);
L = P .* W;
surf(pf_n, ac, L, 'edgecolor', 'none');
You might need
surf(ac, pf_n, L, 'edgecolor', 'none');
This code requires R2016b or later.

#### 5 Comments

Show 2 older comments
Arif Sayyad on 24 Jan 2020
still showing error, sir
Walter Roberson on 24 Jan 2020
I need your full code, initializing all of the variables.
Arif Sayyad on 24 Jan 2020
i got the plot sir.... thank you so much... :)

Sign in to comment.

### More Answers (0)

Sign in to answer this question.

### Tags

No tags entered yet.

Translated by