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

1 回表示 (過去 30 日間)
max
max 2013 年 3 月 25 日
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