Réponse apportée
Undefined function 'tr' for input arguments of type 'double
The error is pretty self-explanatory, you are missing the function 'tr'. The function needs to be on your path (if it exists), o...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Convert variable-width text file numbers to UINT8 table?
It's not very elegant, and it's not very efficient - so enjoy: nRaw = {'130 216 165 154 233 210 209 129' ' 63 ...

plus de 11 ans il y a | 0

Réponse apportée
The data is not correctly written with CSVWRITE, after 100000 rows
You could use fprintf instead. fid = fopen('test.csv','w'); fprintf(fid,'%0.2f\n', [0:0.01:1100]);

plus de 11 ans il y a | 0

Réponse apportée
Out of memory issue
For large CSV files you are less likely to run into memory issues if you read it line by line, for example: nFile = 'file.c...

plus de 11 ans il y a | 0

Réponse apportée
S-function dimension matching problem with lots of "Terminator" blocks
_"we all know that in S-function block, the input dimension must be SAME as output dimension"_ I'm really not sure where you ...

plus de 12 ans il y a | 0

Réponse apportée
when i run the below code i get an error picture1 does not exist..where should i save the image to get the results
From the MATLAB help relating to imread: _If the file is not in the current directory or in a directory in the MATLAB path, s...

presque 13 ans il y a | 0

A résolu


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

presque 13 ans il y a

A résolu


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

presque 13 ans il y a

Réponse apportée
Function 'ss' implicitly resolved in the MATLAB workspace. Implicit evaluation in MATLAB is not supported. Please declare this function extrinsic using eml.extrinsic('ss'), or call it using feval.
What this error message is saying is that in order to use the state space function (ss) Simulink has to call the MATLAB workspac...

presque 13 ans il y a | 1

Réponse apportée
Axis dimensions in points
Here is an example of what I think you want to do: plot(1:10,1:10); h = gca; set(h, 'Units', 'Points'); nPos = get...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Error when using the same program on an other computer
The 'parfor' functionality is part of the Parallel Processing Toolbox. I would assume that second computer doesn't have this too...

presque 13 ans il y a | 0

Réponse apportée
"plus/minus" sign operator
Not exactly elegant, but it works: A = [1 2 3]; B = (dec2bin(0:2^length(A)-1) - '0'); C = sum(B .* repmat(A, 2^length...

presque 13 ans il y a | 0

Réponse apportée
Dos command gives error
If you want to send commands to an executable you need to modify the call slightly. Try this: dos('"C:\Program Files\Or...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
what does this instruction means?
It means sfdr will take on the maximum value contained in the array ptot between element number nper+4 and element number N/2. ...

presque 13 ans il y a | 0

| A accepté

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...

plus de 13 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(:) ...

plus de 13 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 =...

plus de 13 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...

plus de 13 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);

plus de 13 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...

plus de 13 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...

plus de 13 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>

plus de 13 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));

plus de 13 ans il y a | 0

| A accepté

A résolu


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

plus de 13 ans il y a

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.

plus de 13 ans il y a | 1

A résolu


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

plus de 13 ans il y a

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...

plus de 13 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...

plus de 13 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...

plus de 13 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...

plus de 13 ans il y a | 0

Charger plus