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

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Nxt lego mindstorms connected to matlab
Have you seen this tutorial - see

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 1

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 1

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

Beantwortet
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]; ...

mehr als 3 Jahre vor | 0

Beantwortet
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) =? (...

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 2

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

Beantwortet
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) % ...

mehr als 3 Jahre vor | 1

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

mehr als 3 Jahre vor | 1

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

mehr als 3 Jahre vor | 1

Mehr laden