Réponse apportée
Increasing value of each row from matrix A to create Matrix B, then replace 21 into 1 while the rest into 0 to create Matrix C
B=A+(1:31); index=B==21; B(index)=1; B(~index)=0

environ 6 ans il y a | 0

Réponse apportée
Removing NaN in all the columns from matrix A to produce matrix B
index=any(isnan(A)); B=A(:,~index)

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Simulink filtering of a table
The straightforward way to do this is to use "n-D Lookup Table". You have a 5-D lookup table here. The first 5 columns are the l...

environ 6 ans il y a | 0

Réponse apportée
How to store dynamically an array in a For iterator Simulink Subsystem
I know this might be a simple example behind your real need. But this is unnecessary. The for-loop can be implemented inside th...

environ 6 ans il y a | 0

Réponse apportée
Issue with the variable after exiting for loop
Yes. before the loop abc_p=zeros(length (ring_vec), length (opcon_vec), length (rccorner_vec) ,....), matching the size in...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Set lower than 0.1 values to zero in tables that stored in a cell
In general, this is how you do it. Apply it to a table inside a cell should not be that difficult. a=rand(3,5); index=a<0.5; ...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
system command pressing return
This trick has worked many times. Try it. Create a text file called KeyInput.txt, in which you hit return twice and save it. Ba...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
ressistors with small random offset in SIMULINK
This "Variable Resistor" is not the right one to use. This "Variable Resistor" represents a physical variable resistor in the la...

environ 6 ans il y a | 0

Réponse apportée
isempty is allways zero
zero and empty are different isempty([]) isempty(0) isempty('')

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Eliminate certain entries of cell array
Would it possible to make it array? a=1:5; b=1:3; a=setdiff(a,b)

environ 6 ans il y a | 0

Réponse apportée
Stop Simulink simulation when reached an oscillating steady state amplitude
If you have this toolbox and can use this block, maybe you can look at the rate of change of the magnitude. Sinusoidal Measurem...

environ 6 ans il y a | 0

Réponse apportée
How to run a Simulink simulation using keyboard
Ctrl+T Keyboard and Mouse Actions for Simulink Modeling

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Taking element of matrix from state space model of plant
Use the DeMux or BusSelector block

environ 6 ans il y a | 0

| A accepté

Réponse apportée
can a new function be defined in the middle of livescript?
No. %% a=1; function out=timestwo(in) out=in*2; end b=timestwo(a) Error: File: Untitled Line: 8 Column: 1 Function d...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Problem with the use of find(diff...>1))
just run diff(Xr) first and you will see why

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How can I delete a particular element in a set of workspace variables?
For a one-time processing, you can do this for r = 1:length(C) if C(r).size(1)>839 str=sprintf('%s(840:end)=[];',...

environ 6 ans il y a | 0

Réponse apportée
how to make the sum of all centroids?
Feed your "Centroid" signal to a "Sum" block, connect the output of "Sum" to a "Unit Delay" block, connect the output of "Unit D...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
How do I rerun a Simulink model?
In general, most Simulink blocks support vector and array input. For example, the multiply (Product) block supports element-wise...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
save a fprintf as text file
fid=fopen('MyTextFile.txt','wt'); fprintf(fid,...); fclose(fid);

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Saturating Functions at a certain value
x=[0:0.01:20]; expo=@(x) min(2.^x,100); plot(x,expo(x));

environ 6 ans il y a | 0

Réponse apportée
Is it possible to create a library of Model Reference blocks?
It is possible but based on what you described, I would say a library of subsystem blocks are better than a library of model ref...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How to create a block diagram that will increment a value?
A counter block, multiplied by 0.1 or -0.1

environ 6 ans il y a | 0

| A accepté

Réponse apportée
how to get simulink stop time even if using code generation
Not sure what you mean. >> vdp >> get_param('vdp','StopTime') ans = '20'

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Triggering blocks on simulink
It sounds right. Comparing a with 0.75 and 0.85 will generate two high or low logical signals. Combine these two logical signals...

environ 6 ans il y a | 0

Réponse apportée
How do you change the port names in a lookup table programatically?
You can't change the lable "u1", "u2". They are just to identify the first dimention input, 2nd dimension input, etc. They have ...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Re-arrange cell accordingly to a sorted vector
utilizde another output of sort(). Note legend() is a function. [newY, index]=sort(Y) newLegend=oldLegend(index)

environ 6 ans il y a | 1

| A accepté

Réponse apportée
Cell rows/columns size
c={'12',[],'adjk';'jkjf','j;',[]} b=cellfun(@isempty,c)

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Ways to define 'data store memory' block
This is on that page. Create A=Simulink.Signal in base workspace, then you can use DataStoreRead or DataStoreWrite block with da...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Distributing a cell array into another
strcat(repmat(A,size(B')),repmat({' '},[length(B),length(A)]),repmat(B',size(A)))

environ 6 ans il y a | 0

Réponse apportée
Execution Time Calculation in Simulink
Like this? tic; sim('MyModel'); toc;

environ 6 ans il y a | 0

Charger plus