Réponse apportée
Problems with figures generated by the compiled App
This type of issues happen, when "hold all" or "hold on" is being used in the code. The solution is to use "hold off": ... pl...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Nxt lego mindstorms connected to matlab
Have you seen this tutorial - see

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How can i return the output in an array to be used in a following function?
Here is the corrected code: myFreqArray = [25 32 40 50 63 79 100 126 158 200 251 316 398 501 631 794 1000 ... 1259 1585 ...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Plotting amplitude spectrum of a signal
tmax=0.5; t=0:0.001:tmax; fs=1000; tsamp=0:1/fs:tmax; f1 = 18; f2 = 321.37; y = sin(2*pi*f1*tsamp...

environ 3 ans il y a | 0

Réponse apportée
Compute error between two graphs, each graph contains point data forming multiple curves.
There are a few ways to do it. x=linspace(0, 2*pi); f = 3.5*sin(2*x); % Fit model y = f+randn(size(x)); % Experimental ...

environ 3 ans il y a | 0

Réponse apportée
How to write a matlab code to perform moving compuation for any equation?
There are a couple of ways to do it, e.g.: V = randi([-10, 100], 1, 1000); n = 1:30:numel(V); for ii=1:numel(n)-1 Vs(ii)...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
what is the short code for the following?
% Simple one is using eye() KET = eye(14) BRA = KET; % This is optional: BRA =KET.' gives the same result ket0=KET(:,1); k...

environ 3 ans il y a | 1

Réponse apportée
Finding values of implicit function of three dimension
Using fminbnd(): b=10; v=70; ux=90; e=exp(1); EQN = @(u)(b^u*(ux/e*u)^(v/2)-b^(ux/2)); Sol = fminbnd(EQN, 2, 10) % t=2; x...

environ 3 ans il y a | 0

Réponse apportée
How to put table in another table?
If I understood your question correctly, you are trying to add a table on the 8th column of the table variable - stations. If so...

environ 3 ans il y a | 0

Réponse apportée
parametric helix around a line
Here is a solution: % Step 1. Solve for the unknowns of the helix equations using the given P2 point P1 = [0,0,0]; P2 = [1,3,...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
My code can produce results when running in command windows but can't when running as script
Have tried to make one code of your two m-files, e.g.: % Two files inside one M-file clear; cmd_start = 'S'; arduinoObj = se...

environ 3 ans il y a | 0

Réponse apportée
Minimization of two simultaneous ODES with shared parameters
If you all other parameter values, then you can write a fcn handle or function file of the two ODEs. Then find the system soluti...

environ 3 ans il y a | 0

Réponse apportée
Error using fopen Unable to find file. Ensure file exists and path is valid.
One of the possible scenarious for such an error might be that your data file is residing in OneDrive (Cloud). Solution is usin...

environ 3 ans il y a | 0

Réponse apportée
Parametrizing surface in 3 D
You can use quiver3() fcn of MATLAB - see DOC. And write a simple code, e.g.: [X,Y] = meshgrid(-1:0.1:1,-2:0.2:2); Z = 1-X-Y;...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Hartogs - Hughes algorithm
As given in your formulation, is this Dirac delta fcn with a few different time delays t1, t2, t3. If so, you can consider using...

environ 3 ans il y a | 0

Réponse apportée
plotting bode and step on the same graph
There are a couple of issues. Step response is in time domain and Bode is in a frequency response. Therefore they are not compat...

environ 3 ans il y a | 0

Réponse apportée
Simulation of Faraday Waves with Matlab
Here is a corrected code of your exercise: clearvars; clc % Define simulation parameters rho = 1000; % fluid density [kg/m...

environ 3 ans il y a | 0

Réponse apportée
To find intersection, and to calculate the area between two curves for two functions.
Step 1. Calculation the two functions x = linspace(0, 1, 200); f = exp(x)-1; g = 1-x.^2; Step 2. Plot the calculated f(x) an...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Set position of image in matlab code PDF
This can be achieved using %%, e.g.: % Image is shown here after the command imshow() imshow("MY_image.jpg") %% Simulation ...

environ 3 ans il y a | 0

Réponse apportée
How do I solve this differential equation 2nd order numerically within matlab?
Here is a corrected complete code: F = @(t,y)([y(2); 2*sin(t) - 3*y(2) - y(1)]); % Note signa(t) = sin(t) IC0 = [1; 0]; ...

environ 3 ans il y a | 0

Réponse apportée
How do I solve this differential equation 2nd order numerically within matlab?
There are a couple of points. (1) As you showed, it is an IVP. But you have one Initial Condition y(0), what about dy(0) =? (...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Char not working properly ?
To display in a figure is straightforward, e.g.: figure; title(char(8337)) text(0.5, 0.5, ['This is the character: ' char(833...

environ 3 ans il y a | 0

Réponse apportée
i want to use while loop
Here is the version of your code with the [while... end] operation: n=5; i=1; while i<=n j=1; while j<=n i...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Labelling multiple plots of the same color with a single legend label.
In your exerise, there are a coupole of different ways to do that. (1) An easier one is to combine your data and plot them once...

environ 3 ans il y a | 2

Réponse apportée
How can I add different values to an already existing MATLAB function file?
There are a few issues that is necessary to understand how function files work - see this DOC. (1) Input arguments in your fcn ...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How do I solve 'The filename specified was not found in the MATLAB path.' error?
There are a few issues as shown in your provided screenshot (that would've been great if you had posted your code here). % (1...

environ 3 ans il y a | 0

Réponse apportée
String date and time identification
Hi, Here is one of the possible ways of displaying the time strings: DD= '2021-07-011407404.5'; DDate = DD(1:10) D2 = DD(1...

environ 3 ans il y a | 0

Réponse apportée
How to remove negative values using tanh and have higher y-axis values?
Here is the corrected solution. x = linspace (117, 117.8); e1 = tanh(117.3*(x-117.35)) + randn(size(x))/8; plot(x,e1*1e3) % ...

environ 3 ans il y a | 1

Réponse apportée
Matlabd variable is not chaning in workspace
Michelle, Looking at your attached code that recalls your system function and simulates it, I presume that you are working with...

environ 3 ans il y a | 1

Réponse apportée
How to vectorize this piece of code by replacing all the for-loops?
Here is the vectorized code without any loops: th=pi/180; u=[40*th 50*th 60*th 70*th]; b=u; K=length(u); % Note that N<M c...

environ 3 ans il y a | 1

Charger plus