Réponse apportée
How can I speed up fread(), fwrite() ?
Theoretically, it takes 4 seconds to send 57600 bytes at 115200 bit rate. 57600*8/115200 =4

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How to keep the date data included in a file when they are imported into MATLAB?
>> a=importdata('test.dat') a = data: [3x4 double] textdata: {3x1 cell} rowheaders: {...

plus de 10 ans il y a | 0

Réponse apportée
How to print blank rows on top of CSV file
Yes. It should give you a blank row. Print a whitespace should also do it. fid=fopen('test.csv','w+t'); fprintf(fid,'\n'...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
what is the fastest way to convert a cell array of delimited numbers into a matrix
a={'1,5012,0,35,6';'2,395,1,35,8'}; b=str2num(char(a)) b = 1 5012 0 35 6...

plus de 10 ans il y a | 1

Réponse apportée
setdiff for two matrices
setdiff(a,b,'rows') ??

plus de 10 ans il y a | 0

Réponse apportée
Compare 2 dimensional matrix for same pair elements
a = [1,1,2,3,3,4,5,6,6;2,3,1,4,5,1,2,3,5]; b = [1,2,4,3,3,5;2,1,2,5,4,2]; aa=a.'; bb=b.'; index=ismember(aa,bb...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
Get plot of designed root locus from control system designer
The function is rlocus(). You do need the Control System Toolbox. h = tf([2 5 1],[1 2 3]); rlocus(h)

plus de 10 ans il y a | 0

Réponse apportée
Hello, How to clip a sine wave only on positive axis?
Use the MinMax block. Take a "Min" operation with the constant of 3 should do it.

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
concatenate different data type matrices
lower case, cat(), not CAT().

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How to find enumerated constant block inside the model using command line?
There is no "Enumerated Constant" block type. It is a masked SubSystem block. You need to use: find_system('testmodel','MaskT...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How do I froce MATLAB to wait for Simulink simulation to be paused or stopped before resuming ?
You are trying to constantly monitor the "SimulationStatus" of your model. That is not efficient. I wonder, in the callback o...

plus de 10 ans il y a | 0

Réponse apportée
Is there any function which returns the content of a variable as string?
num2str(); mat2str()

plus de 10 ans il y a | 0

Réponse apportée
Deleting elements in cell array constrained by logic
B = [0,0,0,1,1,0,0,0,0,0,0]; A = {[4,2,5],[3,5,7],[2,3,8],[4,5,6]}; NewA=cellfun(@(x) x(~ismember(x,find(B))),A,'uni...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
I want to return back to a certain loop
There is no "goto" statement in MATLAB if that is what you are looking for. I think your task could be solved with a recursive f...

plus de 10 ans il y a | 0

Réponse apportée
how to display the name of an input function by a function functions?
fhandle=@sin; func2str(fhandle) ans = sin

plus de 10 ans il y a | 0

Réponse apportée
Initialize logic block simulink
# There is no "initial condition" in a Simulink Logical Operator block. The output is solely dependent on the input/inputs. # B...

plus de 10 ans il y a | 0

Réponse apportée
Undefined function or variable "sum".
check the syntax of the sum() function Syntax B = sum(A) B = sum(A,dim) B = sum(..., 'double') B = sum(..., dim...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
I have implemented if else structure in stateflow. But I keep getting warning "transition has an action with no side effect" for the action transition for the if and else part. What does this mean?
Inside {} should be action statements, such as assignments, e.g. action=20; action==20 is a condition. Pay attention to th...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Can I commercially sell software I create using Matlab GUI?
Yes. Royalty-free distribution of applications to users who do not need MATLAB http://www.mathworks.com/help/compiler/pro...

plus de 10 ans il y a | 0

Réponse apportée
error in using year()
There must be a variable called "year" in the workspace. Try this: year=2002*ones(120,1); Year = year('05-Aug-2003') It...

plus de 10 ans il y a | 0

Réponse apportée
How do I rename a structure?
This is primarily due to the fact that the top level structure name of your data is varying and the name is long. You can use "d...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How do I get Simulink Model Properties to workspace? Especifically Model history logs..
You can use get_param(ModelName, ParameterName) to get the needed info. Depending on the Simulink version, refer to the docu...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
repeated -append sometimes fails with permission denied
Use rehash after saving the file might solve this issue. From the help text of rehash: The only time one should need to use ...

plus de 10 ans il y a | 0

Réponse apportée
How to break a for loop but then continue with the rest of code
Use continue or break to control the for-loop. help continue help break

plus de 10 ans il y a | 0

Réponse apportée
Is there a way to detect embedded matlab function inside a subsystem in a complex simulink model?
In Command Window, run this command Blocks=find_system(YourRootLevelModel,'FollowLinks','On','LookUnderMasks','All','MaskDe...

plus de 10 ans il y a | 0

Réponse apportée
Extract Submatrix with Logical Indexing Including Zeros
C=A.*B Or, if insisting on "logical indexing" D=zeros(size(A)) D(B)=A(B)

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
How to concatenate horizontally multiple text files in a folder to have all data in one txt file?
The old fashion DOS command copy could do the task. You can also call it in MATLAB using system(). The trick is the "+" symbol. ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Is there a simple way to set a property of multiple (potentially different) objects in a cell array?
This might be hard. cellfun() won't apply either. However, I know that if I have an array of the object handles, set(ArrayOfObje...

plus de 10 ans il y a | 0

Réponse apportée
How can I return the minimum value that is not zero inside a for loop?
How about using a temp variable? temp=hourdata(months==i,1:end); temp(temp<=0)=inf; mins(i,:) = min(temp,[],1); cl...

plus de 10 ans il y a | 1

Réponse apportée
FOR loop merge plots
Since you have multiple plots, you can use figure() to specify which window to plot on. Use hold on if you want to plot the curv...

plus de 10 ans il y a | 0

| A accepté

Charger plus