Réponse apportée
How I can Change the input and output data type of matlab function block? I want to change it to Matrix. Plz help me I am using matlab 2016a.
Press Ctrl+H at your model to open the Model Explorer, on the left, find and select the MATLAB Function block, on the right, you...

plus de 7 ans il y a | 0

Réponse apportée
Simulink Settings for Blocks
One way I can think of (or actually I am doing it in this way) is that you modify the built-in Simulink library to reflect these...

plus de 7 ans il y a | 0

Réponse apportée
Using Regex to get strings with whitespace within them.
white space in regular expression is \s

plus de 7 ans il y a | 0

Réponse apportée
Creating text file with columns of data
In this case, you can use fprintf(fileID,'%f %f\n',data')

plus de 7 ans il y a | 1

Réponse apportée
How do i plot data from a structure? and extract data from a structure?
[SpeedA.distanceA_km, SpeedA.SpeedA_kmph]

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How can I read Simulink comments (annotations) from the Matlab command window?
What do you really mean by "read"? vdp; a=find_system('vdp','FindAll','On','type','annotation'); b=get(a,'Name') celldisp(...

plus de 7 ans il y a | 1

Réponse apportée
How To Use Workspace Parameters in Simulink
You already did! In the most common case, you define a variable "k" in base workspace (you refer as editor workspace), specify t...

plus de 7 ans il y a | 1

Réponse apportée
Obtaining signal units post compilation
CompiledPortUnits But according to R2018b document, Simulink passes units through the following blocks that do not change dat...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Plotting customized figures using Simulink
Open the model, click menu File, Model Properties, Model Properties Click the Callbacks tab, Select "StopFcn*" on the left, you...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to set fixed values to Simulink parameters instead of variable?
Not following your point. If you want the gain to be a, put in a. If you want the gain to be 2, put in 2. You can add 'a' to th...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
AUTOSAR support package free of charge?
Yes. Install AUTOSAR support package

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How to get a csv file excluding first row and last column to run through if statement?
Let's fix the biggest issue first. Should be numrows = size(data,1); thisrow = data(rownum,:);

plus de 7 ans il y a | 0

Réponse apportée
Reading data from excel
I would suggest reading the whole Excel sheet and then process the data in MATLAB according to your logic. xlsread() is more tim...

plus de 7 ans il y a | 0

Réponse apportée
getting the mean EXCEPT zero entries
M=zeros(5); M(randi(25,10,1))=1:10; M(M==0)=nan; mean(M,'omitnan')

plus de 7 ans il y a | 1

Réponse apportée
How to round a large array to the nearest factor of 0.0064
x-rem(x,0.0064) It is the floor() effect. If you want "round" effect, you might need a few lines more. This example assume...

plus de 7 ans il y a | 0

Réponse apportée
How to build a graph from two graphs at certain intervals
From the diagram, it seems that it can be achieved by using a Switch block. Compare y1 with zero using a Relational Operator blo...

plus de 7 ans il y a | 0

Réponse apportée
bdroot causes problems in MATLAB 2017b
Something may have changed from R2015b to R2017b but I would say that your usage of bdroot() for this purpose is not robust. "Si...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Simulink buffer: How do I fix the error "All sample times must be discrete. No continuous or constant sample times are allowed."
Try feeding the Buffer block with a Constant block. Changing the sample time of the Constant block from "inf" to 0.1 (for exampl...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How to access Data dictionary data in matlab function block simulink
Add a "data" to the MATLAB Function block and specify its scope as "Parameter" (rather than input or output). Have "data" define...

plus de 7 ans il y a | 2

Réponse apportée
Providing Maximum Value as Initial Value for Single Precision Signal Causes Error due to Quantization
I had similar issues with this. I have requested the Mathworks to do an enhancement but have not seen it in place yet. The p...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
how do i create an array of e^x
try exp(x)

plus de 7 ans il y a | 0

Réponse apportée
MATLAB App Designer <--> Simulink
Use the build-in model 'f14' as an example, if you drag in a Knob block and connect it to the Gain block Zw, the changing of the...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Reference model vs subsystem
The official document is here. It gives comparison between Subsystems, libraries and model referencing. It also provided some Ge...

plus de 7 ans il y a | 1

Réponse apportée
Gathering data from a for loop
something like this: t=0:1200:43200; M=zeros(size(t)); for k=1:numel(t) M(k)=M0 + nn*t(k); end plot(t,M)...

presque 8 ans il y a | 0

Réponse apportée
How to split binary and convert to decimal ?
aaa = ['0000001101001011';'0000011010001010';'0000100100111100']; bbb=[aaa(:,1:8); aaa(:,9:16)]; bbb=reshape(bin2dec(bbb...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
Setting Simulink parameter values from script
4. Why has it stopped running properly just because I moved my code into the gui script? When you run "t_step = Simulink.Para...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
Access to memory store via global in matlab function
I think the warning message is clear. If you want to ignore this, go to Simulation, Model Configuration Parameters, Diagnostics,...

presque 8 ans il y a | 0

Réponse apportée
Is there a way to index a variable to a certain position in the array
Depending on the value of n, you want to loop through the different dimension of matrix. I think you can utilize the function...

presque 8 ans il y a | 2

| A accepté

Réponse apportée
switch in a loop while changing variable name according to iter index
construct your data as 60xn matrix Data(1,:)=[mean_RSI_high,mean_RSI_low,mean_NeNMF_high,mean_NeNMF_low]; ... Data(60...

presque 8 ans il y a | 1

| A accepté

Réponse apportée
Save a plot from a function in a structure and save the structure
You can save all your workspace data or selected data into an .mat file. Then you can load or simply double click the .mat file ...

presque 8 ans il y a | 0

| A accepté

Charger plus