contour plot not working after using the help example

15 ビュー (過去 30 日間)
Chinwendu Madubueze
Chinwendu Madubueze 2020 年 5 月 28 日
編集済み: Chinwendu Madubueze 2020 年 5 月 28 日
please help me. My contour is not working. I follow step by step example in Matlab HELP to plot my own work. it keep showing this message. The code is giving below. Thank you.
Index exceeds matrix dimensions.
Error in ==> contour>parseargs at 135
if ischar(args{end})
Error in ==> contour at 67
[pvpairs,args,msg] = parseargs(args); %#ok
clear all
close all
R0 = beta / gamma * (alpha * gamma + gamma * R * (1 - alpha)) + tau;
alpha = 0.4;
beta = 0.25;
gamma = 0.2;
omega = 0.2;
xi = 0.05;
R1 = linspace(0,1,100);
tau1 = linspace(0,1,10);
[tau R] = meshgrid(tau1,R1);
mesh(tau,R,R0) %interpolated
axis tight; hold on
plot(tau,R,R0,'.','MarkerSize',15) %nonuniform
  8 件のコメント
John D'Errico
John D'Errico 2020 年 5 月 28 日
You named the script "contour plot.m" with a space between the two words? Is that how I should read what you said? If so, you need to realize that is not a valid name for a script in MATLAB.
Chinwendu Madubueze
Chinwendu Madubueze 2020 年 5 月 28 日
編集済み: Chinwendu Madubueze 2020 年 5 月 28 日
Thank you very much. It is working now. I changed the script's name. Thank you. I am grateful. I look forward to responses to my second code.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by