在Simulink中的信号生成模型来自matlab 您所在的位置:网站首页 simulink自学 在Simulink中的信号生成模型来自matlab

在Simulink中的信号生成模型来自matlab

2023-04-14 16:02| 来源: 网络整理| 查看: 265

百度翻译此文   有道翻译此文 问题描述

How do I generate following signal in simulink:

t=(0:1000)/1000*10*pi;

I want to build the model of the following matlab code:

t=(0:1000)/1000*10*pi; x = (t).*sin(t); y = (t).*cos(t); z = t; 推荐答案

This is fairly basic stuff. Have you gone through any Simulink tutorial, introduction videos/webinars or even the getting started guide of the documentation?

Here are a few suggestions to help you answer your question:

Set the stop time of your model to 1000s and use a fixed-step solver with a step time of 1s. Use a Clock block with a decimation of 1. That's your 0:1000 vector. Feed the output of your Clock block to a Gain block, with the gain set to 1/(10000*pi). That's your t vector. Feed your t signal to two Trigonometric Function blocks, one set to sin and one set to cos. That will generate two signals, sin(t) and cos(t). Now multiply your t signal with your sin(t) signal using a Product block, to generate your x signal (t*sin(t)). Do the same thing with t and cos(t) to generate your y signal. z is already done since it's equal to t.

EDIT following comments

The answer to your comment is really basic Simulink stuff. You should learn how to use Simulink before trying to do advance stuff like VR in Simulink. It's a bit like trying to run before you can walk.

Here are a few resources that may be useful:

Simulink Videos and Examples Simulink Webinars Simulink tutorial Getting Started with Simulink in the Simulink Documentation

I don't know much about VRML, but be aware that the coordinate system in VRML is different from that in MATLAB/Simulink (see http://www.mathworks.co.uk/help/sl3d/vrml.html). You should also have a look at Virtual World Connection to a Model in the Simulink 3D Animation documentation.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有