Answered
What this means sum( time(i,1:i-1) ) ?
See it yourself: type the following lines one at time at the Matlab command window time=magic(5) i=4 time(i,1:i-1) sum(...

15 years ago | 0

| accepted

Answered
How to iterate through a bus object intil I have a struct of primitives which match RTW output with a script
You mention "a bus object" in the title. Do you have a Simulink.Bus object in the base workspace? If you do, then it is relative...

15 years ago | 1

Answered
How do I define the limits of a discrete model? Why do I receive this error for every t and sht variables?
Your "t" indicates 0.01 as the sample time, but your c2d(x,sht,'zoh') indicate 0.5 as the sample time. You need to make them the...

15 years ago | 2

| accepted

Answered
Problem in Signal Builder
Are you sure? Please not to click the menu "File" in your Simulink model. You need to double click the "Signal Builder" block an...

15 years ago | 0

Answered
Write to Excel file using inputdlg for file name
Based on your code, file_name is a cell array. use xlswrite(file_anme{1},var1,1,'A2') instead.

15 years ago | 0

Answered
How to get the port types and dimensions for a block
Sometimes it is hard to find help in the document. Many times I just poke around and make an educated guess. I made a simple mod...

15 years ago | 1

| accepted

Answered
[DISCONTINUED] Wish-list for MATLAB Answer sections.
Be able to mark a question and its answers into "My QA Collections", just like "My Questions" and "My Answers". This will provid...

15 years ago | 2

Answered
How to get the port types and dimensions for a block
Some properties such as dimensions and data types are not up to date when the model is loaded. These properties depend on other ...

15 years ago | 0

Question


Is there a way to mark a question and its answers for my own interest?
Sometimes I read a question and its answers and feel it is useful for my own interest. But I didn't ask that question nor did I ...

15 years ago | 2 answers | 3

2

answers

Answered
Print Function - Error
You may be able to create a .pdf file directly from print() function depending on your Matlab version. Check your document: ...

15 years ago | 0

Answered
how to design a moving window? which has to move sample by sample in simulink
Here is a quick and easy way to do it in Matlab. a=0:0.1:100; WindowWidth=80; b=sin(a); c=abs(b); d=zeros(size(b)...

15 years ago | 0

Answered
How to iterate through the ports of a block/model
To find out the Inport and Outport of a subsystem block: handles=find_system('MyModel/MySubsystemBlockName','FindAll','On','Sea...

15 years ago | 0

Answered
vector if statement in stateflow
You can use Stateflow to construct a simple flow chart to do that. I assume you know Stateflow "transition", "condition", "actio...

15 years ago | 1

Answered
Ignoring header text when using dlmread or similar function
use textscan(), try the "CommentStyle" parameter. Hopefully, the .xvg file contains fixed number of #lines. FID=fopen('test.x...

15 years ago | 1

| accepted

Answered
how to access .mat file during simulation time
Use this block: Simulink>Sources>From File

15 years ago | 0

| accepted

Answered
Editing Library Blocks
You can always make your own library blocks based on the Simulink library blocks. That is the answer to your question title. How...

15 years ago | 0

Answered
How can I convert a large .mat file (> 400 MB) into an excel file or csv file?
There is a limit on the number of rows and columns in an Excel file. 65536 rows and 256 columns for MS Office 2003. 1,048,576 ro...

15 years ago | 0

Answered
How do I start a counter based on a threshold value in Simulink?
It sounds like that you don't need to re-set your integrator. Let's say your input signal is greater than the threshold for 10 m...

15 years ago | 2

Answered
New to Simulink, output of control system is tout
Go to your model, select menu Simulation>Configuration Parameters ..., on the left column, select Data import/export, tout is th...

15 years ago | 0

Answered
set some values to zero in a matrix or vector
How do you do it in Simulink? It sounds like a Matlab data processing problem, e.g. a=4*rand(3,3) a(a<2)=0 If you do ...

15 years ago | 1

Answered
Doubt in resolve error
You follow the advice by the error message, right? For 1), click menu Simulation>Configuration Parameters ..., select "Solver" ...

15 years ago | 0

| accepted

Answered
How do I start a counter based on a threshold value in Simulink?
This counter question seems to come up often recently. One of the ways to implement a counter in Simulink is to use the Integrat...

15 years ago | 0

| accepted

Answered
How to use the polyfit block in Simulink
I am kind of lost. I don't have the DSP toolbox. Can you repeat the example shown here in <http://www.mathworks.com/help/toolbox...

15 years ago | 0

Answered
saving a newly created colormap
From the help of colormap: MAP = COLORMAP retrieves the current colormap.

15 years ago | 1

Answered
Printing using Publishing HTML- grey boxes for code lines
This is solely an issue regarding print an .html document, right? If you open the html file using Internet Explorer, under File>...

15 years ago | 0

Answered
How to use the polyfit block in Simulink
A wild guess. Can you try the Control points as x'? since your x is 101x1.

15 years ago | 0

Answered
Random Numbers in Simulink
Change the "Seed" property of the "Random number" block to 1:10000 so each series of random number is different.

15 years ago | 0

Answered
Import files from a folder into Matlab based on the files name
So you want to sort your file names according to the value of the numeric part of the file name. This should work. filename...

15 years ago | 1

| accepted

Answered
How to save a GUI In Way that you can run it from another PCs?
If your master (teacher, professor?) has Matlab, he should be able to run the .m file corresponding to your GUI application. You...

15 years ago | 0

| accepted

Answered
Read a specific column of a text file
Can you try to read your text file into MS Excel and save it as .xls file or .csv file then use the xlsread() function?

15 years ago | 0

Load more