VSQ: I need your help to plot a 4D function (the 4th dimension is the colour)

1 次查看(过去 30 天)
The function I have to plot is:
RamBoxCox=0.0688 - 0.0748 * E + 0.000079 * PRR + 0.000209 * v - 0.00882 * S - 0.00231 * E*PRR + 0.000099 * PRR*S - 0.000001 * PRR*v*S
I've tried to plot it in this way:
clc
close all
clear all
syms PRR v E S
assume (0.1 < E < 0.1)
assume(1 < S < 4)
assume(20 < PRR < 70)
assume(25 < v < 100)
RamBoxCox=0.0688 - 0.0748 * E + 0.000079 * PRR + 0.000209 * v - 000882 * S - 0.00231 * E*PRR + 0.000099 * PRR*S - 0.000001 * PRR*v*S
%%Plot
%
cs=25;
cm=jet(cs*5);
ezsurf(E,v,RamBoxCox,'color',cm(S*cs,:))
In this way, the error is that the symbolic variable doesn't implementate the <=,< ecc...
Could you help me?
  1 个评论
Jan
Jan 2013-3-25
编辑:Jan 2013-3-25
The brute clearing header "clc; close all; clear all" wastes a lot of time, usually deletes existing results, but has advantages only in case of massive programming errors, which should be caught by smarter methods.

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2013-3-25
Which MATLAB version are you using? I think the ability to use chains of relationships like
assume (1 < S < 4)
must be quite new. Try
assume( 1 < S & S < 4)
Note: you assume() that E is greater than 0.1 and less than 0.1, which is the empty set.

产品

Community Treasure Hunt

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

Start Hunting!

Translated by