Dears
How to plot data from attachment.
X axis 10-75
Y axis 10-75
Z axis (horizontal) 0-30000

댓글 수: 3

Image Analyst
Image Analyst 2022년 9월 17일
편집: Image Analyst 2022년 9월 17일
Exactly what do the rows and columns in your matrix mean? Which row or column is x, which is y, and which is z???
Have you tried plot3?
Maciej
Maciej 2022년 9월 17일
Dear Friends
row 10-75 on the top is temperature goes into the heat exchanger
column 10-75 is temperature comes out from heat exchanger
rest is the amount of heat exchanged depends on the temperature difference.
so axis x and y is temperature
z (vertical) (mistake in description above) is a heat exchanged
tahk you for help
dpb
dpb 2022년 9월 17일
"row [1, values] 10-75 on the top is temperature goes into the heat exchanger"
"column [1, values] 10-75 is temperature comes out from heat exchanger"
-dpb

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

답변 (1개)

dpb
dpb 2022년 9월 17일
편집: dpb 2022년 9월 17일

1 개 추천

Q=readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1127410/Heat%20exchange.xlsx');
Tin=Q(1,2:end);Tout=Q(2:end,1);Q=Q(2:end,2:end);
surf(Tin,Tout,Q)
hAx=gca;
hAx.View=[-60 40];
xlabel('T_{in}');ylabel('T_{out}');zlabel('Q')
NOTA BENE: Must take the 'Z' data from the overall array read ignoring the first row/column to matchup the actual 'X,Y' vector lengths from the whole array read in that has them all smooshed together. That's the only "trick" here.
It was very confusing to read the description owing to the language issues -- thought were describing that 10 rows/columns were all X, Y values until actually opened the spreadsheet to look -- the image @Image Analyst posted was so small couldn't read it ... :)

댓글 수: 8

Maciej
Maciej 2022년 9월 18일
Thank you very much!
Sorry for inconvenience, for the lack of clarity due to my description.
This is exactly want I want, but could you please help me how can I do this in my matlab.
Im very beginner person. I paste your code to matlab and nothing happened...
dpb
dpb 2022년 9월 18일
SOMETHING must've happened -- an error message, something...
Only change you should need to make would be to use your local file name inplace of the link to the uploaded copy online.
We'd have to see the whole command session to be able to comment further...
Maciej
Maciej 2022년 9월 18일
OK, thank you,
please see snap and how show plot like you showed above
dpb
dpb 2022년 9월 18일
편집: dpb 2022년 9월 18일
That appears to be an issue with your default language/character set -- MATLAB is complaining that it can't read the filename string with bidirectional unicode characters.
I've never run across them before; know nothing about such animals with languages other than English so I'm not sure how one would go about fixing the issue on such a system.
How did you create the text string in the image -- since it was attached as an image and not as the text, we can't see what the actual code bytes are; see what
FQN=....; % paste the filename string in your readmatrix command here
double(FQN(1:10)) % see what the ASCII codes of the first 10 characters are
If just mimic the beginning get
FQN='C:\Users\inzma\...';
double(FQN(1:10))
ans = 1×10
67 58 92 85 115 101 114 115 92 105
where '67' is the ASCII code for single quote. If you don't get that try
FQN=strrep(FQN,char(XX),char(67));
where 'XX' would be the value you see other than 67 (presuming see something different) as first value of the filename. Then retry the code with the patched filename and see what happens.
How did you create the file name above???
Maciej
Maciej 2022년 9월 19일
Thank you for hint - it is 67
I copied file to other folder and change name
Now works!
Thank you for you time and knowledge!
dpb
dpb 2022년 9월 19일
Indeed, that would be expected result.. :)
I had intended to specifically menton you needed to resave the file with the corrected filename w/o the bidirectional unicode characters in it -- or to make sure if the actual filename didn't contain the characters, the filename string were using didn't...
As noted, I've no experience with such, so not sure just what is/isn't supposed to be supported or how...
Maciej
Maciej 2022년 9월 20일
One more question: do you know how generate pareto chart with above data?
dpb
dpb 2022년 9월 20일
MATLAB doesn't have a builtin multivariate Pareto distribution/plot in the base product; whether it has in another toolbox I don't know.

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

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

질문:

2022년 9월 16일

댓글:

dpb
2022년 9월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by