Domanda


Insert Date, Time, Created By, Modified by... etc file properties in m-file
Is it possible to insert the file proprties automatically in m-file (Ofcourse in commented form)

circa 14 anni fa | 1 risposta | 0

1

risposta

Risposto
Problem opening a Simulink file
Currently I dont have access to Windows 7, but probably this may work- Right Click on File -> Select *Open With* -> Select *C...

circa 14 anni fa | 0

Risposto
Reload/Update constants in Simulink
Your question is little bit unclear. If you want to change the value in a *Constant Block*, you can change it run time from its...

circa 14 anni fa | 2

| accettato

Risposto
Simulink: create struct with signal names
Do you want the output values at each time step or just final simulation value ?. You can feed your bus output to a embedded ma...

circa 14 anni fa | 1

| accettato

Risposto
outputting bus using 'To Workspace' block
Simulink does not alloew a matrix signal to be feed as input to bus. One of your input comming to the bus is *matrix*. You ...

oltre 14 anni fa | 0

| accettato

Risposto
appending to a file
fid=fopen('mongiss.lib','a')

oltre 14 anni fa | 0

| accettato

Risposto
String with csv in matlab
Text={'2011-08-18,00:10:00,600,1.56188,3.33684,4.328568,2.03864';'2011-08-18,00:20:00,600,7.26988,7.23684,0.328568,8.03864'}; ...

oltre 14 anni fa | 0

| accettato

Risposto
set_param and callback argument
Where you want to put 'StartFcn' callback function, either for a *block* or for a whole *simulink model* ? *For StartFcn of a b...

oltre 14 anni fa | 0

| accettato

Risposto
Link to Simulink Model File from m-file
What is output of your m-file which you want connect with model? If you want to access variables (data) of your m-file from m...

oltre 14 anni fa | 0

Risposto
determine range within an array
Considering last column of 'type' stored in a cell array, you can find number of 'good' and 'bad' in each cycle with below code ...

oltre 14 anni fa | 0

| accettato

Risposto
insert a value into an array after it's created
Please give example of source array and result array which you want. It is not possible to enter the element in between existing...

oltre 14 anni fa | 1

Risposto
Using global variables in Embedded Matlab function in simulink
Hi Muthappa Make sure that you are ensuring following steps while using global variables with embedded matlab. <http://www.mat...

oltre 14 anni fa | 1

| accettato

Risposto
Run a simulink/script from a pushbutton
*From workspace* block reads wariable from base workapace. If you are defining and writing P1 variable from pushbutton callba...

oltre 14 anni fa | 1

| accettato

Risposto
summation
A=rand(5); As=sum(sum(A));

oltre 14 anni fa | 1

Risposto
Trimming structure of Arrays
Data=structfun(@(x) ( x(6:end) ), Data,'UniformOutput', false);

oltre 14 anni fa | 1

Risposto
Sending input to an embedded block in simulink only at a particular condition
Place your source of 'value' in *'Enabled Subsystem'* and enable this susystem when your condition is satisfied. Find at *Lib...

oltre 14 anni fa | 1

Risposto
Error : Action subsystem have more than one sample time
All blocks in an Action Subsystem *must run at the same rate* as the driving block. You can achieve this by setting each block's...

oltre 14 anni fa | 0

| accettato

Risposto
use comma as decimal seperator
May be this can help you <http://www.mathworks.com/matlabcentral/newsreader/view_thread/241400>

oltre 14 anni fa | 0

Risposto
[DISCONTINUED] Wish-list for MATLAB Answer sections.
I dont know someone have already pointed it or not, Currently *'comments'* have only option to *delete*. It shold also be allo...

oltre 14 anni fa | 1

Risposto
use S-function
You can use 'Embedded MATLAB Function' block in your model for embedding MATLAB code with simulink. This block is available at ...

oltre 14 anni fa | 0

| accettato

Risposto
reding specific elements from .txt file
ReadCol=7; ReadStartRow=4; fh=fopen('test.txt'); txtcell=textscan(fh,'%s','delimiter','\n'); RowInFile=length(...

oltre 14 anni fa | 0

| accettato

Domanda


Why eval() and evalin() are not recommended?
I have read so many times that functions *eval()* and *evalin()* are not recommended. What is the reason? I have a situation...

oltre 14 anni fa | 1 risposta | 1

1

risposta

Risposto
take the real data type of parameters from the Simulink model
hhmmm...... Answer is in you question itself (See comment). gcs specifies the currently selected system or subsystem. Take han...

oltre 14 anni fa | 0

Risposto
reding specific elements from .txt file
StartRow=1; EndRow=6; StartCol=1; EndCol=8; if(StartRow>EndRow || StartCol>EndCol || any([StartRow EndRow Sta...

oltre 14 anni fa | 0

Risposto
saveas throws "Invalid Simulink object handle" error
hist not returns the figure handle. See 'help hist'. Try h2=figure(2); hist(variable1(:,2),50);

oltre 14 anni fa | 0

Risposto
take the real data type of parameters from the Simulink model
You may using parameter name in the 'Constant value' field of constant block. Try CBlks_ValStr=get_param(CBlks,'Value')...

oltre 14 anni fa | 0

Risposto
take the real data type of parameters from the Simulink model
Your question is still not clear. What is 'corresponding block ' If you mean 'constant' blocks and you want output datatype of ...

oltre 14 anni fa | 0

Risposto
Is deleting threads helpful in this forum?
I am agree with Deniel. Deleting a post should be allowed only for question that is unanswered and not commented. As author d...

oltre 14 anni fa | 3

Risposto
manipulating text files
fi=fopen('YourFile.txt','r'); fo=fopen('outfile.txt','w'); txtcell=textscan(fi,'%s','delimiter','\n'); Str1Idx=1; Str2...

oltre 14 anni fa | 0

| accettato

Risposto
is it possible to make command window scroll bar being in position of it self even by runnig a m-file and not going end of wondow?
I don't think it is possible. There is no such command line function.

oltre 14 anni fa | 0

Carica altro