How to plot 3 variables in a function?
Afficher commentaires plus anciens
Hello,
I realize the question I'm asking has been asked a dozen times before but I don't think it applies to my situation.
I'm suppose to plot the following function:

I know E1, v1, E2, v2
I read something about mesh and sliceomatic
I did that but I still get an error saying
"Undefined function 'sliceomatic' for input arguments of type 'double'.
Error in Bonus_1 (line 25) sliceomatic(a,F,D,X)"
Here's the full code: (d1 is D and d2 is X)
%Bonus 1 %Clear command window and variables clearvars; clc; % Material one: Steel v= 0.27~0.3 E=200 GPa % Material two: copper v= 0.355 E=110~128 GPa %Source: http://www.engineeringtoolbox.com/metals-poissons-ratio-d_1268.html
v1 = 0.27; v2 = 0.355; E1 = 200e9; E2 = 110e9;
F = 1:1:200; D = 0.01:0.02:1; X = 0.01:0.02:1;
% create a meshgrid [Fmesh,Dmesh,Xmesh] = meshgrid(F,D,X);
% compute the function value at the meshgrid points a = ((3.*Fmesh/8).*((((1-(v1).^2)/E1)+((1-(v2).^2)/E2))/((1/Dmesh)+(1/Xmesh)))).^(1/3)
% launch sliceomatic sliceomatic(a,F,D,X)
The first time around I did not include ".*" and ".^" but it asked me to, so I did. Thanks in advance
Réponses (1)
Star Strider
le 13 Déc 2014
0 votes
Sliceomatic is a File Exchange contribution.
1 commentaire
Karim Taha
le 13 Déc 2014
Catégories
En savoir plus sur Mathematics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!