小编Moz*_*Moz的帖子

将matlab变量作为全局工作空间

在工作区我制作一个矩阵.

在此输入图像描述

现在我可以在脚本中访问变量了.就像做变量(2)将返回4.

但在一个功能里面

function y= getvariable(x)

y=Variable(x)
end
Run Code Online (Sandbox Code Playgroud)

我收到错误

   y=getvariable(2)
    ??? Undefined function or method 'Variable' for input
    arguments of type 'double'.

    Error in ==> getvariable at 3
    y=Variable(x)
Run Code Online (Sandbox Code Playgroud)

那么如何使Variable矩阵全局化以便我可以通过任何函数访问它?

matlab global function global-variables

5
推荐指数
2
解决办法
2287
查看次数

Convert String to int php

The google books api returns a volumeid for each book. This volumeid is string like this

AZ5J6B1-4BoC
UvK1Slvkz3MC
OBM3AAAAIAAJ
Run Code Online (Sandbox Code Playgroud)

So there are capital letters , small letters, characters like dash(-) underscore(_) etc

So is there a library that converts these characters to integer?

Also can I just convert the string to certain number like

[A-Z]=[0-25]
[a-z]=[26-50]
[special characters like -,_,]=[51-...]
Run Code Online (Sandbox Code Playgroud)

以上自煮脚本是否很好或者是否有某些标准功能在php中完成这项工作?

php string numbers

2
推荐指数
1
解决办法
2354
查看次数

标签 统计

function ×1

global ×1

global-variables ×1

matlab ×1

numbers ×1

php ×1

string ×1