我对C中的程序有点愚蠢的问题.我的编译器说我: 警告:指针和整数之间的比较.我真的不知道为什么.我只想在屏幕上写每个字符.
我的代码:
int i = 0;
char str[50] = {'s', 'a', 'm', 'p','l','e'}; //only for test
while (str[i] != NULL) {
putchar(str[i]);
i++;
}
Run Code Online (Sandbox Code Playgroud)
你能帮我吗?我没有在互联网上找到任何有用的答案.
我想在Matlab 2013b中使用latex功能.使用此功能很简单,它按我的预期工作:
s = sym('s');
latex((s+1)/3)
ans =
\frac{s}{3} + \frac{1}{3}
Run Code Online (Sandbox Code Playgroud)
比我有一个简单的矩阵和乳胶函数返回以下错误:
A = [ 0 1 0; 1 -2 1; -2 4 -2];
latex(A)
Undefined function 'latex' for input arguments of type 'double'.
Run Code Online (Sandbox Code Playgroud)
另一个例子:
latex(3/4 + 4)
Undefined function 'latex' for input arguments of type 'double'.
Run Code Online (Sandbox Code Playgroud)
在处理符号变量但不适用于整数.哪里可能是问题?