Réponse apportée
Cutting down on space while generating code.
I assume you are using RTW. Follow the documentation Real-Time Workshop->User's Guide->Preparing Models for Code Generation->Con...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Using global variable to define a Simulink block parameter
In the InitFcn call, does it call a M-function or M-script? I suspect this is another case of function workspace and base worksp...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
Create Structure Fields with and Array of Strings
help cell2struct And a place to learn struct. <http://blogs.mathworks.com/loren/category/structures/> However, your data is be...

presque 15 ans il y a | 0

Réponse apportée
Best shap for data to be in to work on.
It looks to be a good use case for dataset(). See doc dataset. Also see this blog. <http://blogs.mathworks.com/loren/2009/05/...

presque 15 ans il y a | 0

Réponse apportée
indices and values
%% [I,J,V]=textread('test.txt','(%f,%f) %f'); A=zeros(2,3); A(sub2ind(size(A),I,J))=V

presque 15 ans il y a | 0

Réponse apportée
Singleton dimention as last dimension in matrix
Unless you have further process need, there is really no need to do that. >> size(rand(10)) ans = 10 10 >> ...

presque 15 ans il y a | 4

Réponse apportée
how can i know which toolbox a function is calling?
try depfun()?

presque 15 ans il y a | 0

Réponse apportée
inverse loop
for i=180:-1:1 for j=180:-1:1

presque 15 ans il y a | 7

Réponse apportée
Simulink 'From Workspace' and 'To workspace' elements
You need to check the simulation step size of your Simulink model. The "From Workspace" block specifies a signal with time-value...

presque 15 ans il y a | 0

Réponse apportée
storing words
I am not sure if you follow your own question. There is a much easier way to do this. <http://www.mathworks.com/matlabcentral...

presque 15 ans il y a | 0

Réponse apportée
Manipulate Matrix Element using subscripts (ex: isprime(i-j)) or (i+j)>10)
%% n=10; A=zeros(n); A(isprime(abs(bsxfun(@minus,(1:n)',1:n))))=1

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Running simulation a specified number of times
Put sim('MyModel') inside your for-loop.

presque 15 ans il y a | 1

Réponse apportée
dlmread
Check the help of dlmread(). I believe the range [R1, C1, R2, C2] won't allow negative number. use fullfile() instead of strc...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Linking data points
The way you did, every time it just plots one point (fit,y(i)). Pre-allocate two vectors before the for-loop N=20; y=zeros...

presque 15 ans il y a | 0

Réponse apportée
short and sweet simple question
NewS=S(x)

presque 15 ans il y a | 1

| A accepté

Réponse apportée
What is the location of the file from where the GUI of a toolbox in MATLAB is launched?
To find out the location of a file, run which wavemenu which wavemenu.fig -all

presque 15 ans il y a | 1

| A accepté

Réponse apportée
Reading last lines in a text file
Your data are numerical so I think it's better to read them as numerical data. %% fid = fopen('HCl.txt','rt'); A = textsc...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Geting Info.
<http://www.mathworks.com/products/matlab-coder/?s_cid=global_nav>

presque 15 ans il y a | 0

Réponse apportée
finding root using false position method
Do a plot to find out the curve. If you put the right initial value, it could solve the problem. ezplot(f) x0=-6 x1=6 ...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Comparing sets of data
x=round(rand(10,1)); y=1:10; index=x==0; y(index)=0;

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Looping output values back as input
InputValue=1; for k=1:NumberOfIteration OutputValue=MyFunction(InputValue); InputValue=MyFunction(OutputV...

presque 15 ans il y a | 0

Réponse apportée
Pseudo Noise Sequence
rand()? for k=1:3 rand('seed',k); a=rand(1,5) end The generated random numbers will be repeatable.

presque 15 ans il y a | 0

Réponse apportée
First order system
If you have the transfer function or state space matrix of the system, you can use *dcgain()* to get the gain. If you have jus...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
time on x axis
can you try to skip the "set(gca,'XTick',xData)" line and use the default xtick set by plot()?

presque 15 ans il y a | 0

| A accepté

Réponse apportée
How to extract cell array in matlab
%% c={'22.11.2011 13:58:56.16','22.11.2011 13:58:40.16'}; d=datevec(c); floor(d(:,6))

presque 15 ans il y a | 1

| A accepté

Réponse apportée
How to generate a 3d Spline curve can interp3 be of help
Put the matrix you show in the variable d, are you trying to plot using plot3()? plot3(d(:,1),d(:,2),d(:,3)); grid on;

presque 15 ans il y a | 0

Réponse apportée
Array of struct manipulating
%% construct a structure array M=3; s=struct('a',repmat({1},M,1),'b',repmat({2},M,1),'c',repmat({3},M,1)); %proce...

presque 15 ans il y a | 0

Réponse apportée
Index cell where number jumps
A=[1 2 3 4 5 6 20 21 22 23 24 25 60 61 62 63 64 65] B=diff(A) find(B>1)

presque 15 ans il y a | 1

| A accepté

Réponse apportée
excel dates
Use [Num,Txt,Raw]=xlsread() and then "Raw" will keep the "hh:mm" string format, then you can use datenum() to convert it. If th...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
(Simulink) Passing a string from the mask to a block
String data type is supported for Simulink blocks, see Simulink->Model-Wide Utilities->Block Support Table. But you can use stri...

presque 15 ans il y a | 0

Charger plus