- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我是 Matlab 和 Simulink 的新手,我需要在 Raspberry PI 上运行仿真。对于交互,我使用 Matlab 的 Raspberry PI 支持包。我使用以下代码打开与 Raspberry PI 的连接并读取内部温度传感器:
mypi = raspi('hostname','username','password','port');
temperature = system(mypi,'command_to_read_temperature')
如果我在 Matlab 命令行中单独运行此代码,一切正常,但如果我尝试在 Simulink 中的 Matlab 功能 block 中运行它,它会返回一个错误:
Base class 'matlab.mixin.CustomDisplay' cannot be loaded.
Function 'raspi.m' (#29.3176.7592), line 102, column 9:
"function obj = raspi(hostname, username, password, port)"
Launch diagnostic report.
Component: MATLAB Function | Category: Coder Error
有什么方法可以在 Matlab 函数 block 中运行带有 Raspberry PI 函数的代码吗?我尝试使用 S-Functions,但它太复杂了,而且效果不是很好。
最佳答案
虽然我不明白究竟是什么导致了错误,但我可以解释为什么它不能那样工作。
MATLAB 的 Raspberry 支持包旨在将 Raspberry 用作 IO 板,并在 MATLAB 中提供传感器和执行器。该应用程序本身在您的 PC 上运行。命令 mypi = raspi('hostname','username','password','port');
设置此连接。
您尝试做其他事情,让应用程序在树莓派上运行。对于此用例,Simulink 和 simulink 的支持包是正确的选择。这些 block 同时支持这两种功能,使用网络连接在您的 PC 上模拟应用程序以访问传感器和执行器,或在树莓派上运行应用程序,直接将 IO 构建到您的应用程序中。
关于linux - 在 Simulink 中使用 Matlab Raspberry PI Support Package 函数作为 Matlab Function Block,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34650297/
我收到多行错误,指出它有重复的类 Duplicate class android.support.v4.accessibilityservice.AccessibilityServiceInfoCom
我的项目昨天运行良好,今天却出现以下错误。请帮忙。 出了什么问题:无法解析配置“:app:debugCompileClasspath”的所有文件。 Could not find support-v4.
错误:配置项目“:app”时出现问题。 Could not find support-v4.jar (com.android.support:support-v4:24.0.0). Searched
我正在使用 react-native-webrtc 运行示例应用程序模块。我正在尝试在 android 中运行该应用程序,但出现这样的错误... * What went wrong: A probl
错误:配置项目“:app”时出现问题。 Could not find support-v4.jar (com.android.support:support-v4:24.0.0). Searched
我克隆了我的项目并使用 Android studio 打开,但构建失败并出现以下错误并且同一个项目在其他项目上运行良好。 出了什么问题:无法解析配置“:app:flavorUnsignedReleas
我正在运行示例应用程序......我正在使用 this模块.....但是我收到这样的错误... FAILURE: Build failed with an exception. * What went
我有一个 Ionic 项目,在升级到 OSx Mojave 后,出于某种原因不再构建。 该项目基于 Ionic 3 构建。 我有 Cordova CLI 7.0.0 当我运行时 ionic cordo
我有一个 Ionic 项目,在升级到 OSx Mojave 后,出于某种原因不再构建。 该项目基于 Ionic 3 构建。 我有 Cordova CLI 7.0.0 当我运行时 ionic cordo
添加 Android 平台(ionic cordova platform add android)后,我构建了我的 Ionic 项目(ionic cordova build android),但出现错
这个问题在这里已经有了答案: Manifest merger failed : Attribute application@appComponentFactory - Androidx (14 个答
关于我的 Gradle 文件中的以下“complie”: dependencies { compile 'com.android.support:support-v4:25.3.1' }
有些困惑。 我想更频繁地使用@supports 但是...我不关心浏览器如何看待它。希望您能说清楚,如果可以的话谢谢您。 如果浏览器本身不理解@supports,它如何计算@support 'not'
我刚刚升级到 Dart 2 和最新版本的 Flutter,现在我无法构建我的应用程序。我在互联网上环顾四周,但仍然不明白为什么会发生这种情况。 我得到的错误是: FAILURE: Build fail
我正在学习 Firebase,但由于以下错误而陷入困境: Error:Failed to resolve: com.android.support:customtabs:25.4.0 Error:Fa
我在构建本周时出于某种原因尝试使用Cordova进行项目时遇到问题: cordova build android gradle获取com.android.support:support alpha而不
对应的androidx是什么com.android.support:support-compat 的图书馆实现push notifications ? 他们说here它是 androidx 的一部分,
我正在尝试为我的应用设置插桩单元测试。并且我已根据以下开发者站点链接添加了依赖项。 https://developer.android.com/training/testing/unit-testin
当我想使用 Proguard 规则生成签名的 APK(发布)时,我收到了以下错误消息: Cannot find a version of 'com.android.support:support-an
这个问题在这里已经有了答案: Failed to resolve: com.android.support:appcompat-v7:26.0.0 (14 个答案) Failed to resolv
我是一名优秀的程序员,十分优秀!