Réponse apportée
How can i search for a specific Constant Value?
This will search through your Simulink model for any constant containing the value of '8'. However, when you retrieve the 'Value...

environ 12 ans il y a | 0

Réponse apportée
Given matrices XX and YY of sizes 3X3, how can I generate the following matrix: [XX(1,1) YY(1,1); XX(1,2) YY(1,2)... ?
or: XX = magic(3); YY = eye(3); XX_trans = transpose(XX); YY_trans = transpose(YY); out = [XX_trans(:) ...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Given matrices XX and YY of sizes 3X3, how can I generate the following matrix: [XX(1,1) YY(1,1); XX(1,2) YY(1,2)... ?
This is one way of doing it - expanding on my answer to your previous question: XX = magic(3); YY = eye(3); out =...

environ 12 ans il y a | 0

Réponse apportée
unwrap the angle code
Going from a range of -360 to 360 degrees to 0 to 360 degrees is usually called wrapping the angle, not unwrapping. This anony...

environ 12 ans il y a | 0

Réponse apportée
removing a loop from a script
Simple: d = 1+(20-1).*rand(365,5); bthD = 1:5; kd = 1+(2-1).*rand(365,1); newD = d.*exp(-kd*bthD);

environ 12 ans il y a | 0

| A accepté

Réponse apportée
How can I generate the matrix [1 1; 1 2; 1 3 ; 2 1; 2 2; 2 3; 3 1 ; 3 2 ; 3 3] without loops?
I have no idea what your data is, but to generate the matrix in the question try: out = unique(nchoosek([1:3, 1:3], 2), 'ro...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
remove rows in cell if a column is equal to a number
X = {'B737' 'DAL1240' [10] 'MD88' 'DAL1542' [ 9] 'B747' 'DAL1284' [ 9] 'B737' 'DAL15...

environ 12 ans il y a | 1

Réponse apportée
How can I change fileID name in a for loop?
<http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F>

environ 12 ans il y a | 1

Réponse apportée
Finding the numbers of a vector with the same length?
rep=diff(find(diff([-Inf x Inf]))); val=x(cumsum(rep)); out = hist(rep(val == 1), max(rep));

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Why the ''break'' function does not work
Are you putting 'clear all' at the beginning of your scripts by any chance? This will remove the breakpoints.

environ 12 ans il y a | 1

Réponse apportée
how to getting data from URL
weatherData = urlread('http://weather.yahooapis.com/forecastrss?w=551801&u=c'); You will however have to parse the RSS feed...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Compound Interest with monthly Contributions, Unable to vectorize.
You don't even need to vectorise, just calculate the answer directly. The answer below is slightly lower than your answer. But i...

environ 12 ans il y a | 0

Réponse apportée
Error with silent install
You left the file installation key section blank. You therefore need to add you key and uncomment the line (by removing the # sy...

environ 12 ans il y a | 0

Réponse apportée
Simulation of speed control of a stepper motor using phase locked loop
There are plenty of tutorials for this already, just look for those related to velocity feedback control: <http://www.mathwor...

environ 12 ans il y a | 0

Réponse apportée
Changing the bits randomly
or less brute force without a for loop: nInput = 1056; nShift = bin2dec('11111'); nOffset = nInput - nShift; ...

environ 12 ans il y a | 0

Réponse apportée
Changing the bits randomly
Try this, it is a somewhat brute force approach to solving your problem. The value 'nMatch' should give you the desired answer: ...

environ 12 ans il y a | 0

Réponse apportée
Undefined function 'eval' for input arguments of type 'double'.
You are getting that error because you are trying to evaluate a double. A double is just a double - there is nothing there to ev...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
How to write multiple if statements
You have too many 'end' statements within your code. An if-else statement should be formatted like this: if a == 1 % ...

plus de 12 ans il y a | 4

| A accepté

Réponse apportée
what should i do for error 'Undefined function or method 'state' for input arguments of type 'char' when using 'SS' command?
The state-space input matrices to the 'ss' command should all be numeric and have the following size relationships: A: p x ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
count the duration for which variable value is zero in simulink
I'd take the input and convert it into a logical signal (1's and 0's), inverse this signal using a NOT block. Convert this back ...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Extract numbers from mixed string
In order to extract a certain value: Str = ['Test setup: MaxDistance = 60 m, Rate = 1.000, ', ... 'Permitted Erro...

plus de 12 ans il y a | 0

Réponse apportée
Up and down counter
I would suggest using either an integrator block with external initial conditions and a switched input, or design a Stateflow bl...

plus de 12 ans il y a | 0

Réponse apportée
Control a Simulink module by an M-file
You are all making this more complicated than it actually is. Use the 'Step' block. Set the initial value to '100', set the fina...

plus de 12 ans il y a | 0

Réponse apportée
How to create a loop calcualtion?
Here is an example of a quick loop that calculates a value based on the previous value. The loop simply calculates the value as ...

plus de 12 ans il y a | 1

Réponse apportée
Finding specific phrases within a cell array (1)
See 'strtok' as one possible solutions. For example: celltxt{1} = 'EAST WINDS 15 TO 20 KNOTS. SEAS 4 TO 6 FEET.'; [tok, ...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Error displayed : Undefined function or variable 'Tg'
Even if it is a global variable you still need to add it to your Embedded Function. Open your Embedded Function, then click ...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Change the line color in subplot
An easier way might be to call 'hold all' after each subplot definition, and then just plot your values as normal. For example: ...

plus de 12 ans il y a | 1

Réponse apportée
Error compounds adding date numbers
If you are using MATLAB date numbers they are stored as double precision numbers. This means the resolution of the date numbers ...

plus de 12 ans il y a | 0

Réponse apportée
verification of the intepretation of a simple code that contains "isequalwithequalnans"
No, that interpretation is NOT correct. The statement says if BOTH b and c are different to a then 'Not ok'. Or in other wor...

plus de 12 ans il y a | 0

Réponse apportée
Creating a matrix using for loop.
Try this: a = [0.12;0.1;0.2;0.3;0.4;0.5;0.6;0.7;0.8;0.9] f = zeros(length(a)); for b=length(a):-1:1 f(:,...

plus de 12 ans il y a | 1

Charger plus