I want to use simple code ( plot.m) in Octave to build a drawing. My code is as follows:
plot.m
printf('Plotting Data...\n'); x = -10:0.1:10; plot(x, sin(x));
But I get an error message:
error: incorrect use of script ex1 / plot.m in an index expression error: called from the graph in row 3 of column 1
Could you tell me how to solve it? Thank!
I have the same problem to solve it
here is my script and called it "xx.m"
syms x; f = x^3 - 6*x^2 + 11*x - 6; ezplot(f) xlabel("x") ylabel("y") title ("name") grid on
xx run xx, .
xx
run xx
-, " script"
: script.
somefunction(), Octave somefunction.m . 1 , somefunction . , ( - ).
somefunction()
somefunction.m
somefunction
plot(). script plot.m. Octave plot.m ... script! , plot.m script, . (, x sin(x) ), " script ".
plot()
x
sin(x)
, , , plot.m.
1 , somefunction. , .
Source: https://habr.com/ru/post/1664240/More articles:Is there a way to "unlock" an exception in python? - pythonDocker Compose CLI Flags - dockerHow to join two JSON array objects in Node - jsonHow to access API with Vue.js? - jsonDoes Vue.JS work with AJAX HTTP calls? - ajaxะะฐะบ ะทะฐะฟัััะธัั DayDream Controller ะธะท Unity Editor? - daydreamIn Scala, how can I limit several parameters, should there be a type inside the same type? - scalaSymfony: Why is isInitialized always false? - symfonyIOS app crashes when authenticating with Firebase - iosVoice calls through a chat application using Firebase - firebaseAll Articles