octave - 在八度音程中运行时,我在所有程序中都遇到了类似的错误
问题描述
function plotData(X, y)
%PLOTDATA Plots the data points X and y into a new figure
% PLOTDATA(x,y) plots the data points with + for the positive examples
% and o for the negative examples. X is assumed to be a Mx2 matrix.
% Create New Figure
figure; hold on;
% Find Indices of Positive and Negative Examples
pos = find(y == 1);
neg = find(y == 0);
% Plot Examples
plot(X(pos, 1), X(pos, 2), 'k+','LineWidth', 2, ...
'MarkerSize', 7);
plot(X(neg, 1), X(neg, 2), 'ko', 'MarkerFaceColor', 'y', ...
'MarkerSize', 7);
hold off;
end
结果
octave:17> plotData ()
error: 'y' undefined near line 10 column 12
error: called from
plotData at line 10 column 5
解决方案
推荐阅读
- php - PHP Ajax 查询 - 将多个文件上传为 blob
- windows - WdfFdoQueryForInterface 失败,出现 0xc00000bb
- java - 如何在公共无效方法中连续播放媒体(mp3)
- docker - 在所有服务启动之前在 docker-compose 中执行初始化脚本
- javascript - 如何让按钮在点击时消失
- node.js - npm 错误!无法读取未定义的属性“0”
- react-native - scrollView中的滚动选项卡,内容为flatlist且有header,如何解决滚动冲突
- python - 好的三元组和和除数
- javascript - Javascript 在移动设备上不起作用,但在桌面上适用于四个 otp 框的选项卡到下一个字段
- html - 如何使用 ts 中的变量作为 HTML 文件中的标记名?