Réponse apportée
How to implement this coupled ODE
[t,m] = ode45(@(t,m) myode(t,m), tspan, m0); Here myode has 2 inputs only. function dydt = myode(t,y,a_in) Here it has 2 inp...

presque 4 ans il y a | 0

Réponse apportée
Loop cycle to input similar txt files
Data_{m}_{i} is your invention an no valid Matlab syntax. This is not the way programming works. Matlab does not magically modi...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
randomly sample a pair of values in a double
You want a random integer in the range [1, 65] as index? randi([1, 65]) I have no idea, what "distance and then the value/180*p...

presque 4 ans il y a | 0

Réponse apportée
Rename variable throughout project/directory
You can modify the field names using regexprep : % Get a list of M-files: List = dir(fullfile(Folder, '**', '.m')); for k = 1...

presque 4 ans il y a | 0

Réponse apportée
explaining this code for me please it's about making circuit in matlab but i confused here because i want to write comments in every line i have 160 line but i put some
while ~isreal(R) || any(R<=0) || mod(n,2)==0 || any(n<1) Comment: Repeat until R is a real positive value and n is an odd posit...

presque 4 ans il y a | 0

Réponse apportée
How to access specific data in a cell array
No. Cell arrays need to be accessed in a loop for this case. You can hide the loop using cellfun, but this runs a loop internall...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
MEX error LNK2019:unresolved symbol
I suggest to follow the official installation instructions: https://nlopt.readthedocs.io/en/latest/NLopt_Installation/ and for W...

presque 4 ans il y a | 0

Réponse apportée
Increase figure size on the screen but save with specific dimension in centimeters
Figures have the properties 'Position', which defines the size on the screen, and 'PaperPosition' and 'PaperSize', which determi...

presque 4 ans il y a | 0

Réponse apportée
I am getting an error "Index in position 1 exceeds array bounds. Index must not exceed 1." Error in "v_x(n) = fmincon(fun_x(n), x0, A_x(n,:), b_x(n,:)); Can someone help"
Change: fun_x{n} = @(v_x)((norm(v_x(n) - v_des_x(n)))^2); fun_y{n} = @(v_y)((norm(v_y(n) - v_des_y(n)))^2); v_x(n...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How can i use intersect function correctly ?
There are no overlapping points: f = @(x) 1 + cos(x); g = @(x) sin(x); x = 1.54:.01:1.6; plot(x, f(x), 'r.', x, g(x), 'b.');...

presque 4 ans il y a | 2

Réponse apportée
generating matrices from another matrix
x = [1,0,0,1,0,1]; d = diag(x); Share1 = d; Share1(1, 2) = 1; Share2 = d; Share2(1, 3) = 1; Share3 ...

presque 4 ans il y a | 0

Réponse apportée
how to select a whole row in a matrix
ismember(A, B, 'rows') % Or maybe ismember(A.', B.', 'rows')

presque 4 ans il y a | 1

| A accepté

Réponse apportée
fzero not working with nested functions and mvncdf
I tried to reproduce your problem, but get a different error message: r = 0.03; d = 0.06; sigma = 0.2; V0 = 100; ...

presque 4 ans il y a | 0

Question


What can we do with the thread "license-manager-error-9"?
The thread why-do-i-receive-license-manager-error-9 is not useful anymore. The huge page reacts extremely slow and many users ad...

presque 4 ans il y a | 5 réponses | 0

5

réponses

Réponse apportée
Loop for plot vectors
A = [20 10 80 805 82.1420812600000 20 10 80 815 82.5962426700000 20 10 80 825 83.0389831800000 20 10 80 835 83.46...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
how to use if loop to determine to make a plot
function output = myfcn(input1, input2, input3) if nargin < 3 doPlot = true; % Default if 3rd input is not provided else ...

presque 4 ans il y a | 1

Réponse apportée
How can I apply an operation to every row of a matrix?
If R is e.g. a linear transformation expressed as a [2 x 2] matrix: coor = rand(162, 2); a = 2 * pi / 180; R = [cos(...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
Add time stamp in seconds
The text() command inserts text in an axes. Then the text is displayed on the screen. This does not modify the image in any way....

presque 4 ans il y a | 1

Réponse apportée
Can the efficienty of this code be improved, either computationally or just in terms of lines of code?
A0 = [2; 3; 1; 2; 2; 3; 1; 2; 2; 3]; B0 = [4.10047; 7.44549; 3.62159; 6.56964; 2.87221; 4.51231; 4.01697; 5.60534; 5.5440; 7.07...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How to convert matrices of different sizes in a for loop into a single column vector?
... PhaseC = cell(1, nLevels); for k = 1:nLevels ... PhaseC{k} = acos(subband./amp); end Phase = cat(2, PhaseC{:})...

presque 4 ans il y a | 0

Réponse apportée
How to keep only a new modification in an array using for loop?
a = [1 0 0 1 1 0 0 1 0]; new = repmat(a, numel(a), 1); for j = 1:numel(a) if new(j, j) == 0 new(j, j) = 1; ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
License checkout failed after cloning my HDD
Use a clone tool like CloneZilla, which duplicates the volume ID also. [EDITED] The volume ID can be modified by the computer a...

presque 4 ans il y a | 0

Réponse apportée
How can I generate a matrix of pseudo-random floating point values from a uniform distribution(5, 8), but without range() function and other ToolBoxes?
Does this mean, that you cannot use rand()? range() is trivial to replace: rrange(2)-rrange(1)

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How to rename a lot of mfiles in a folder
folder = 'D:\something'; files = dir(folder); files = file(~[files.isdir]); % Files only! for k = 1:numel(files) %...

presque 4 ans il y a | 0

Réponse apportée
Speeding up matrix operations
Matlab calls optimized libraries to solve linear algebra operations. These libraries are based on BLAS and LAPACK, but modern ve...

presque 4 ans il y a | 1

Réponse apportée
Power of a binary matrix
If you really define the matrix multiplication with mod(A*B, 2): A = randi([0,1], 11, 11); % Test data, use your "a" tic %...

presque 4 ans il y a | 1

Réponse apportée
Power of a binary matrix
[EDITED] This is not the multiplication wanted by the OP - I leave it for educational reasons. Assuming, that you mean the us...

presque 4 ans il y a | 1

Réponse apportée
How to get calculated variables from ode function?
The function to be integrated computes these values. You have all required inputs as output of ODE23S already. Use them as input...

presque 4 ans il y a | 0

Réponse apportée
How to write data horizontally in matlab using xlswrite to express meaning like excel
'A2:A4' specifies 3 elemente in a row.

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Automatically load a struct from a struct with a variable name
file = 'test1.mat' [~, name] = fileparts(file); values = load(file); subStruct = values.(name); a = subStruct.a; ...

presque 4 ans il y a | 0

Charger plus