can anyone write a 3d code for this
显示 更早的评论

6 个评论
Walter Roberson
2021-1-8
编辑:Walter Roberson
2021-1-8
Sorry, I cannot read the writing clearly enough.
It looks like w is defined
w = n*R*T*log(w/v1)
Is that the same w on the left side and in the numerator of the division in the log ?
Then it looks like you have Q*w and it looks like it is being defined as
Q*w -> Q * w = n*R_T*log(w/v1)
which looks like it changes from R*T to
and also seems to be missing the w on the right hand side, unless T/R_T has the right ratio to eliminate the w multiplier ?
Then there seems to be a definition for T but I can't read it. And then there seems to be
but maybe it is
... hard to say.
It is not obvious how any of this would connect together to create a 3D plot, especially since you show us a 2D plot instead...
alice white
2021-1-8
Walter Roberson
2021-1-9
What are the independent variables, and their ranges? What is the dependent variable? What is the formula for the dependent variable in terms of the independent variables?
alice white
2021-1-9
alice white
2021-1-9
Walter Roberson
2021-1-9
f= -p1v1ln(v2/v1)
That appears to have three input variables,
,
,
and one output variable, f .
You indicate that p is the output, so it sounds as if you have a given f value and you want
p_1 = f ./ (v_1 .* log(v_2 ./ v_1))
This appears to have three input variables, f,
,
and one output variable,
. This would require a 4 dimensional plot.
You want to add T to the formula in some way that I already told you I cannot read from the image you posted in your Question.
回答(1 个)
Image Analyst
2021-1-9
Did you try just plotting the formula? Something like this:
% independent v
% dependent p
% formula : the last pic i sent u the logaritm function
v1 = 2; % Whatever.....
p1 = 5; % Whatever.....
v2 = linspace(0, 5, 1000);
p = -p1 * v1 * log(v2 ./ v1);
plot(v2, p, 'b-');
grid on;
ylabel('P(pa)', 'FontSize', 20);
xlabel('v in m^3', 'FontSize', 20);
Adapt as needed for different T, v, v1, v2, p1, etc.
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

