Réponse apportée
I would like to create an array to store a password, website combo.
Use string array instead of cell array for efficiency. You can also considre to use table. pa = ["abc", "def"] pa = addPasswo...

plus de 2 ans il y a | 0

Réponse apportée
call function with multiparameter:what is the best solution?
You could also use arguments block. doc arguments for more details. a)CaricoSistemi2Last_Struct(Settings) b)CaricoSistemi2Las...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Error using plot: Not Enough Input Arguments
Your data is not in right format. Here is one way to convert the string to number. % Experiment 4 % Computations and Generate...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
How do I write several variables to a table with row labels?
% Your data MeanAmplitude = rand(); AmpError = rand(); MeanFrequency = rand(); FrequencyError = rand(); % Name can be an...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
How to rotate a map?
It is upside down. Add the following: axis xy

plus de 2 ans il y a | 0

Réponse apportée
What is different between FFT and SHIFTFFT
First, it is not correct to say which is better unless you define what is "better". fft(x) has better resolution but higher si...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to close only anova figures
How about collecting the desired figure handles in an array when creating the figures, such as h(i) = figure(...); At the en...

presque 3 ans il y a | 0

Réponse apportée
I want to view a formula as a mathematical expression and not a single line
For displaying the formatted formula, you can use "livescrip". Simply save your file as ".mlx" file and run it. syms a b c sy...

presque 3 ans il y a | 1

Réponse apportée
How to add a single line to my plot??
Your specification is not clear and this is a guess. x = 2*rand(10, 1); y = 2*rand(10, 1); scatter(x, y) hold on dx = 0.1; ...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
How to add legend in CIE diagram
plotChromaticity hold on x = rand(1,4); y=rand(1,4); name =["red", "blue", "green", "yellow"] for i=1:length(x) hs(i) ...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Scatter not showing full precision of data.
websave("data.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1514124/data.mat") load("data.mat") figure...

presque 3 ans il y a | 0

Réponse apportée
Loop over combinations of elements of several vectors
You can use combinations. % arbitrary number of vectors with arbitrary size v{1}=rand(3,1); v{2}=rand(2,1); v{3}=rand(2,1); ...

presque 3 ans il y a | 0

Réponse apportée
Use sky colormap in old Matlab version
Copy the following data: c = sky(256); for i=1:height(c) fprintf("%9.6f %9.6f %9.6f\n", c(i, :)) end

presque 3 ans il y a | 1

| A accepté

Réponse apportée
code correction : subplot in for + length problem
figure for N = [10,40,100] subplot(2,1,1); hold on [axe,formula] = passe_bas(N); % brackets above st...

presque 3 ans il y a | 0

Réponse apportée
Export of table results in PDF
You can use livescript. Then you can hide the code and export to pdf. For example t=array2table(rand(3,2)); disp(t) Or you c...

presque 3 ans il y a | 0

Réponse apportée
Unwanted contour lines generated by contour()
Yo5ur function curve has very abrupt change near the ege (see one vertical slice of data). Therefore you will see many contour ...

presque 3 ans il y a | 0

Réponse apportée
Greetings! I'm looking for assistance in understanding what's causing the problem in my code.
y = determineMode(4, 5, 6, 1, 2) function y = determineMode(teg, pv, pzt, ~, D, ~, ~, ~, ~) % Inputs: % teg: Voltage ...

presque 3 ans il y a | 0

Réponse apportée
Not enough inputs with input parser
F = @(x) x.^2.*sin(x)-0.2.*x.^3+3.*x.^2+x-4-0.005.*x.^4; nx = newtonsMethod(F,6.5) function x = newtonsMethod(func,guess,tol,d...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How can I add recession bars to a time series plot?
data = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1488862/example_data.xlsx'); y = data.var3; x=...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Quiver. Make wind scale of 1m/s inside plot
[x, y] = meshgrid(-2:.2:2); z = x.*exp(-x.^2-y.^2); [dx, dy] = gradient(z, 0.2); sc = 'off'; % scale quiver(x,y,dx,dy...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to plot a bar graph for individual values?
x = 1:2; y = 0:0.1:0.5; z = [0.725, 0.654, 0.543, 0.812, 0.698, 0.456; 0.628, 0.652, 0.783, 0.682, 0.758, 0.765]; b = b...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to make Matlab give different answers for different text inputs of different lengths
A = input('Ask me anything: ','s'); if strcmpi(A, 'Yes') % compare string (case insensitive) disp('Yes') else disp...

presque 3 ans il y a | 0

Réponse apportée
How to Pre-allocate a 4D photo array
%Photos = zeros(1920, 1080, 3, 1800, 'uint8'); Photos = zeros(100, 50, 3, 10, 'uint8'); whos

presque 3 ans il y a | 0

Réponse apportée
How to check the freqeuncy response of a boxcar filter?
clear all; clc; fs =2000; fc =20/(fs/2); N = 1/fc; h = boxcar(N); % 1/N = fc h = h/sum(h); bcoeff = h; acoeff = 1; ...

presque 3 ans il y a | 0

Réponse apportée
Possibilities of using for end loop in code
In MATLAB, you can do it without loop (preferred approach): theta = [0 10 20 30 50]'; r = [9 8 7 6 3]'; y = [...

environ 3 ans il y a | 0

Réponse apportée
Running MATLAB on virtual machine for more memory?
I am running some very time-consuming MATLAB scripts on my laptop and it keeps on running out of memory. ==> You may want to c...

environ 3 ans il y a | 0

Réponse apportée
How to extract coefficients of custom variables in symbolic expression in MATLAB?
Let iB=1, jB=0 and kB=0. Then compute omegaB.

environ 3 ans il y a | 0

Réponse apportée
find numbers in a string
s = 'E_Field (Farfield) (Cartesian) (-0 -173.648 983.808)(Abs) (cosim Tran1).txt'; s1 = 'E_Field (Farfield) (Cartesian) (-0 -1...

environ 3 ans il y a | 0

Réponse apportée
How to segment a curve into linear and nonlinear pieces
load(websave("DatasetXY.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1437433/DatasetXY.mat")); whos [...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Summing up subsequent rows if equal
A = [ 2 3 5 3 4 5 2 3 5 3 4 5 5 6 6 2 3 5 5 6 6 3 4 5 ]; ...

environ 3 ans il y a | 0

Charger plus