Réponse apportée
Simulink "MATLAB Function" block and extremum value
Note that there are a couple of important points here. (1) v input argument values have to be given/known to perform the calcula...

environ 3 ans il y a | 0

Réponse apportée
Using vertcat to convert cellarray consisting of mutiple columns into an array of multiple columns
Here is how it can be attained: C1 = {randi(3, 3)}; C2 = {ones(3)}; C3 = {zeros(3)}; C4 = {randi(3, 3)}; C5 = {ones(3)}; ...

environ 3 ans il y a | 0

Réponse apportée
Global error and local error of euler method
Yes, error increase if h step size increases. See this simple example: dy = y(t) with y(0) = 3; y(n+1) =y(n)+h*f(t(n), y(n)); ...

environ 3 ans il y a | 0

Réponse apportée
vertical concatenate strings in msgbox
Here is the corrected code: v = VideoReader(filename); % Create Videoreader object %Get i...

environ 3 ans il y a | 1

Réponse apportée
Automatically sorting years and quarters in a serial number
One of the easy solutions is to cretae a table array with variable names: Year (numerical) and Quarter (categorical array), e.g....

environ 3 ans il y a | 0

Réponse apportée
Why won't my graph plot properly in the live script?
Your shown screenshot shows that you are viewing it in MLX- editor. If you hover your mouse over your plotted figure and click o...

environ 3 ans il y a | 0

Réponse apportée
How to remove rows in a cell array?
Here is how you can do it: load('stations1.mat'); [Rs, Cs] = find(cellfun(@isempty, stations1)); stations1(Rs,:)=[];

environ 3 ans il y a | 1

| A accepté

Réponse apportée
How to code equation
Put both functions in plot() command or use hold on: m = 10e-3; a = 0.05; c = 0.1; x1 = @(t)(m/a)*exp(-(c/a)*t); x2 = @(t)...

environ 3 ans il y a | 0

Réponse apportée
index error,exceeding array dimensions.
Here is the corrected code: Vet = randi([-9,9], 1, 7); dim = numel(Vet)+1; V = ordina(Vet,dim) function Vet_ord = ordina(Vet...

environ 3 ans il y a | 0

Réponse apportée
Plotting as intregral the acceleration of a thing
This is how you can solve this exercise: N=100; T=11; dt=T/N; t=0:dt:T; F = [0 2 2 0 0 -2 -2 0]; % Accel...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Matlab Simulink Arduino package
You would need MATLAB Support Package for Arduino Hardware - see Arduino Support from MATLAB - Hardware Support - MATLAB & Simul...

environ 3 ans il y a | 0

Réponse apportée
How to code equation
A couple of small errors have been corrected: m = 10e-3; a = 0.05; c = 0.1; x = @(t)(m/a)*exp(-(c/a)*t); t = linspace(0,1...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Calculate Wavelength from velocity FFT
the Matlab fcn fft() computes the complex valued discrete Fourier Transform values. Thus, there is an error in your code. To ob...

environ 3 ans il y a | 0

Réponse apportée
how to solve this error?
Here is completely fixed code. There were several errors with inconsistent variable names, setting and solving symbolic equation...

environ 3 ans il y a | 0

Réponse apportée
How to pull values from a variable to set as a new variable/column
If understood your question correctly, to read this data file and sort out its content, readtable() would be a good strating poi...

environ 3 ans il y a | 0

Réponse apportée
Why is the FOR loop in my program producing empty matrices?
Here is a bit edited and revised version of your code: Ne=8; Ni=2; re=rand(Ne,1); ri=rand(Ni,1); a=[0.02*ones(Ne,1); 0.02+0.0...

environ 3 ans il y a | 0

Réponse apportée
Plot a sinusoidal signal from an x(t) equation
You need to plot this exercise this way: Ts = 1/8; %seconds t = 0:Ts:1; x = @(t) cos(2*pi*t-(pi/2)); XX=x(t); plot(t, XX, ...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How do I let the user enter an equation that is then able to be used in abs() calcualtions
Use this small change by specifying the input argument (x) in your code: x = 0:0.001:1; fprintf(1,'For example: cos(x)\n'); ...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Keep Simulink Data Inspector plot settings between simulation runs
You should try to run this: Simulink.sdi.clearPreferences to get back to the default settings of Simulink. See help doc here...

environ 3 ans il y a | 0

Réponse apportée
Finding the maximum value in a single
Here is how you can get max values from 1-by-n-by-3 array from each channel exaplined with a simple example: PP(:,:,1) = round(...

environ 3 ans il y a | 0

Réponse apportée
How to change the colorbar limits in Matlab?
clim does the job, e.g.: surf(peaks) clim([1.2 2.6]) colorbar

environ 3 ans il y a | 0

Réponse apportée
Change values in vectors
V=[1,2,3,4,5,6] IDX = find(V>3); V(IDX)=2 %% ALT. Way: V=[1,2,3,4,5,6] V(V>3)=2

environ 3 ans il y a | 0

Réponse apportée
how does zoomplot work?
1st of all zoomPlot() is a 3rd party function and is not part of MATLAB 2022b package or its toolboxes. Therefore, to see what c...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Limit of Decreasing Plot Size in MATLAB
You should try these options with 'units', 'pixels': set(gcf,'units', 'pixels','position', [700, 700, 50, 50])

environ 3 ans il y a | 0

Réponse apportée
How to Extract X,Y,Z vectors from grid data?
If you data as given n-by-5, then you can just use surf(z), e.g.: data = rand(5,50); surf(data)

environ 3 ans il y a | 0

Réponse apportée
%() Error: Illegal use of reserved keyword "end".
Here is the corrected part of your code: ... for ID_realz = 1:N rng('shuffle'); Mult_noise = (sigma*randn(size(I...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
I get an error that does not match the number of rows and columns in the program.
There were over dozens of size related errors, figure handle and uncommented comments in your code that are fixed. The main func...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Interpolating numerical function of many variables
You should consider here some sort of unit compatibe value for U, S, D, V. In other words, 100% (and 80%, 60%, 40%, 20%) open U ...

environ 3 ans il y a | 0

Réponse apportée
My code does not work
Note also that there is one more undefined input vars in your function call. v_e is undefined, v_idex is computed from the given...

environ 3 ans il y a | 0

Réponse apportée
for loop to read different files
There are a few different ways that can do this exercise. Here is one of them: clearvars FILE = fullfile('C:\Users\...', '*.tx...

environ 3 ans il y a | 1

Charger plus