A répondu

Plotting a 2d graph

a = randi([1 5]) b = randi([1 5]) c = randi([3 10]) syms x y fimplicit( a*x^2 + b*y^2 == c ); axis equal

Plotting a 2d graph

a = randi([1 5]) b = randi([1 5]) c = randi([3 10]) syms x y fimplicit( a*x^2 + b*y^2 == c ); axis equal

3 jours il y a | 0

| A accepté

A répondu

How to solve error in particle filter code

nx = 6; % number of states %... ny = 1; % number of observations %... x = zeros(n...

How to solve error in particle filter code

nx = 6; % number of states %... ny = 1; % number of observations %... x = zeros(n...

3 jours il y a | 0

A répondu

I am struggling to plot iteration vs error in the matlab code? can anyone help me with this? very much appreciate it.

fprintf('\n Iteration %d: Relative error = %g\n', N, rel_error);

I am struggling to plot iteration vs error in the matlab code? can anyone help me with this? very much appreciate it.

fprintf('\n Iteration %d: Relative error = %g\n', N, rel_error);

3 jours il y a | 0

A répondu

Error in the script

A/B is approximately A*pinv(B) where the * is inner product (algebraic matrix multiplication). When both sides are column vector...

Error in the script

A/B is approximately A*pinv(B) where the * is inner product (algebraic matrix multiplication). When both sides are column vector...

3 jours il y a | 0

| A accepté

A répondu

How to create a matlab script of an already created .slx file?

No, there is no way to convert a Simulink or Simscape or Stateflow model to the corresponding MATLAB code. And if there were the...

How to create a matlab script of an already created .slx file?

No, there is no way to convert a Simulink or Simscape or Stateflow model to the corresponding MATLAB code. And if there were the...

3 jours il y a | 0

A répondu

How can I read Serial Data?

readline() and sscanf() using 'A%dB%dC' format

How can I read Serial Data?

readline() and sscanf() using 'A%dB%dC' format

3 jours il y a | 0

A répondu

How can I make a string array consisting of strings with numerical suffixes?

compose("sub%02d",1:50).'

How can I make a string array consisting of strings with numerical suffixes?

compose("sub%02d",1:50).'

3 jours il y a | 1

A répondu

Find the some of a row with numbers greater than -1 in matlab

B = [103, 61, 0, 0, 62, -999, -999, 0, 0, 2] sum( max(B, 0), 2)

Find the some of a row with numbers greater than -1 in matlab

B = [103, 61, 0, 0, 62, -999, -999, 0, 0, 2] sum( max(B, 0), 2)

4 jours il y a | 1

| A accepté

A répondu

How to do piecewise linear approximation from x and y points?

A piecewise linear approximation could have a piecewise break at or between any pair of points, and is therefore not unique. You...

How to do piecewise linear approximation from x and y points?

A piecewise linear approximation could have a piecewise break at or between any pair of points, and is therefore not unique. You...

4 jours il y a | 0

A répondu

Command Window output weird on Mac OS

I suspect that Preferences -> Fonts, Desktop Code Font has been set to a non-monospaced font.

Command Window output weird on Mac OS

I suspect that Preferences -> Fonts, Desktop Code Font has been set to a non-monospaced font.

4 jours il y a | 0

| A accepté

A répondu

Constrained Particle Swarm Optimization

https://www.mathworks.com/matlabcentral/fileexchange/25986-constrained-particle-swarm-optimization You would need to use a non...

Constrained Particle Swarm Optimization

https://www.mathworks.com/matlabcentral/fileexchange/25986-constrained-particle-swarm-optimization You would need to use a non...

4 jours il y a | 0

| A accepté

A répondu

Extract points from generated mesh

e2 = antenna.Ellipse('Majoraxis',4,'Minoraxis',2) h = mesh(e2,'MaxEdgeLength',1e-1) xyz = e2.Points .'; These are the point...

Extract points from generated mesh

e2 = antenna.Ellipse('Majoraxis',4,'Minoraxis',2) h = mesh(e2,'MaxEdgeLength',1e-1) xyz = e2.Points .'; These are the point...

4 jours il y a | 0

| A accepté

A répondu

Is there a one line implementation for this?

syms t; M = [sin(t), cos(t); tan(t), t]; result = arrayfun(@(I,J) double(subs(M(I,J), t, 1:10)), [1 1; 2 2], [1 2; 1 2], 'unifor...

Is there a one line implementation for this?

syms t; M = [sin(t), cos(t); tan(t), t]; result = arrayfun(@(I,J) double(subs(M(I,J), t, 1:10)), [1 1; 2 2], [1 2; 1 2], 'unifor...

4 jours il y a | 0

A répondu

DIsplay numbers in an expression in scientific notation

syms L1 L2 C1 C2 C3 Rl s; L1=10e-9; L2=500e-12; C1=600E-12; C2=2E-9; C3=100E-12; Rl=2; H_P_V2DivI1 = (C2*Rl*s + 1)/(C1*C2...

DIsplay numbers in an expression in scientific notation

syms L1 L2 C1 C2 C3 Rl s; L1=10e-9; L2=500e-12; C1=600E-12; C2=2E-9; C3=100E-12; Rl=2; H_P_V2DivI1 = (C2*Rl*s + 1)/(C1*C2...

4 jours il y a | 0

| A accepté

A répondu

Why the mod function does not work

angstn =mod(atan2(norm(det([P2-P0;P1-P0])),dot(P2-P0,P1-P0)),2*pi); norm() is always non-negative, so you are taking atan2(...

Why the mod function does not work

angstn =mod(atan2(norm(det([P2-P0;P1-P0])),dot(P2-P0,P1-P0)),2*pi); norm() is always non-negative, so you are taking atan2(...

4 jours il y a | 0

A répondu

How to horizontally merge cells of strings/chars for each row without writing a for-loop?

fmt = repmat('%s', 1, size(YourCell,2)); output = compose(fmt, string(YourCell));

How to horizontally merge cells of strings/chars for each row without writing a for-loop?

fmt = repmat('%s', 1, size(YourCell,2)); output = compose(fmt, string(YourCell));

6 jours il y a | 0

| A accepté

A répondu

Directed random wandering.

Consider that when you move from 0 to 50, you need to take 50 "unbalanced" steps -- 50 steps that are +1 and for which there are...

Directed random wandering.

Consider that when you move from 0 to 50, you need to take 50 "unbalanced" steps -- 50 steps that are +1 and for which there are...

6 jours il y a | 0

| A accepté

A répondu

Store for loop data in cell array

years = 2000:2005; months = 1 : 12; num_years = length(years); num_months = length(months); monthly_average_cell = cell(nu...

Store for loop data in cell array

years = 2000:2005; months = 1 : 12; num_years = length(years); num_months = length(months); monthly_average_cell = cell(nu...

6 jours il y a | 0

| A accepté

A répondu

HOW CAN I PLOT THE SUM OF A LOOP AGAINST TIME TO HAVE SIX LINES OF SOLUTION ON THE GRAPH

Your third variable, x2, is the only one that is length 6, so I had to guess that you wanted the sum of all the entries for each...

HOW CAN I PLOT THE SUM OF A LOOP AGAINST TIME TO HAVE SIX LINES OF SOLUTION ON THE GRAPH

Your third variable, x2, is the only one that is length 6, so I had to guess that you wanted the sum of all the entries for each...

6 jours il y a | 0

A répondu

How to check requested add-ons for particular models?

https://www.mathworks.com/help/simulink/ug/run-dependency-analysis.html can check dependencies for Simulink models.

How to check requested add-ons for particular models?

https://www.mathworks.com/help/simulink/ug/run-dependency-analysis.html can check dependencies for Simulink models.

6 jours il y a | 0

| A accepté

A répondu

Using two logical vectors to extract data

mean(A(3, A(1,:) == 2000 & A(2,:) == 1))

Using two logical vectors to extract data

mean(A(3, A(1,:) == 2000 & A(2,:) == 1))

6 jours il y a | 0

A répondu

how to have A and A' show 3x2 column vector

You will need to create a new class that is derived from double, and for the new class you will need to either change the vertca...

how to have A and A' show 3x2 column vector

You will need to create a new class that is derived from double, and for the new class you will need to either change the vertca...

6 jours il y a | 1

A répondu

How to correct "Undefined function 'mtimes' for input arguments of type 'cell'."

The mlx constructs 11 parameters starting from alpha1 . However the modelFile expects 12 parameters starting from theta0

How to correct "Undefined function 'mtimes' for input arguments of type 'cell'."

The mlx constructs 11 parameters starting from alpha1 . However the modelFile expects 12 parameters starting from theta0

6 jours il y a | 0

| A accepté

A répondu

On CodeHS I’m trying to solve 6.1.6, checkerboard, but I keep getting an error of an undefined variable on line 14, I wrote color_value = color_value + 1. Please help me

There is no MATLAB function named def . You could define such a function and take advantage of command/function duality. For exa...

On CodeHS I’m trying to solve 6.1.6, checkerboard, but I keep getting an error of an undefined variable on line 14, I wrote color_value = color_value + 1. Please help me

There is no MATLAB function named def . You could define such a function and take advantage of command/function duality. For exa...

6 jours il y a | 0

A répondu

Synchronizing two matlab scripts on two devices

If the devices support RS232 and you have one of the increasingly-rare true serial ports, then you can use serialport() and conf...

Synchronizing two matlab scripts on two devices

If the devices support RS232 and you have one of the increasingly-rare true serial ports, then you can use serialport() and conf...

6 jours il y a | 0

A répondu

converting vector result into matrices for surf command

filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/1200898/with.txt'; with = readtable(filename); with...

converting vector result into matrices for surf command

filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/1200898/with.txt'; with = readtable(filename); with...

6 jours il y a | 0

A répondu

Finding the roots of a high degree equation?

You can increase the efficiency. syms z L n k EI p c p1 N Pi = sym(pi); n =20; sz_i = n; sz_j = n; Y = (1-cos((2*N-1)*Pi/2...

Finding the roots of a high degree equation?

You can increase the efficiency. syms z L n k EI p c p1 N Pi = sym(pi); n =20; sz_i = n; sz_j = n; Y = (1-cos((2*N-1)*Pi/2...

6 jours il y a | 0

| A accepté

A répondu

Index in position 1 is invalid. Array indices must be positive integers or logical values.

A((dy*i)/dy1,(dx*j)/dx1) having a division in a calculation of coordinates is very often a problem. You can sometimes get away ...

Index in position 1 is invalid. Array indices must be positive integers or logical values.

A((dy*i)/dy1,(dx*j)/dx1) having a division in a calculation of coordinates is very often a problem. You can sometimes get away ...

6 jours il y a | 0

A répondu

what is the fastest (high speed data transfer) way of connecting the Arduino due board (running a high speed motor) with Simulink for realtime data transmission and control?

Ethernet. For example there is https://docs.arduino.cc/retired/boards/arduino-ethernet-rev3-without-poe with an W5100 controll...

what is the fastest (high speed data transfer) way of connecting the Arduino due board (running a high speed motor) with Simulink for realtime data transmission and control?

Ethernet. For example there is https://docs.arduino.cc/retired/boards/arduino-ethernet-rev3-without-poe with an W5100 controll...

7 jours il y a | 0

A répondu

How to determine the relationship between two variables from a plotted graph

You cannot reliably determine the relationship between the variables from a graph. Suppose you had a trial function N = f(M) . ...

How to determine the relationship between two variables from a plotted graph

You cannot reliably determine the relationship between the variables from a graph. Suppose you had a trial function N = f(M) . ...

7 jours il y a | 1