Réponse apportée
How can I create a random matrix without repeating any value between column
You can use reshape(), randperm(), numel(), size() fcns to create ramdom swaps of the already existing matrix elements: A1 = [1...

presque 3 ans il y a | 0

Réponse apportée
Need to change some (not all) values in a Histogram.
You can use simply this: N1 = sum(DATA==1); % How many 1s in Data N2 = sum(DATA==2); % How many 2s in Data N3 = sum(DATA==3);...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Extract set of gains from data file
It is possible only if your have your input data and preseumably, you have gotten the system response data. Using the system ide...

presque 3 ans il y a | 0

Réponse apportée
How to make a line plot and indicating data gap?
Here is how it can be done. Note that there are only 4 individual data points are missing and thus, they can be displayed indivi...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
What do I need to change in matlab example?
If you look at carefully to the documentation, it states explicitly that you'd need to load your data: ... data = load('vehicl...

presque 3 ans il y a | 0

Réponse apportée
Creating plot with 2 x axes from property inspector?
Here is a doc for two x-axes and y-axes: DOC Here is how to create two x-axes: x1=0:.1:2*pi; Y1 = sin(2*x1); x2 = -pi:.1:pi;...

presque 3 ans il y a | 0

Réponse apportée
Hi guys I want to write a code to calculate G11, for each station in range frequencies 0 to 15 and plot im(G11) against frequencies. I write the below code but it doesn't work
There are a couple of mistakes: (1) Indices can be "0"- see loop i = 0:length(stations), j=0:length(frequencies) (2) The last ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
solve function with two variables by ga toolbox
Here is how it can be solved with GA: lb = [0.001, 0.01]; ub = [0.045, 0.1]; numberOfVariables = 2; y=@(x) 0.25-4.27*x(1)+0....

presque 3 ans il y a | 0

Réponse apportée
Writing inside cell array
If understood correctly your question, here is how it can be solved: t = randn(1); g = sin(2*pi*t); f = repmat(g, 1,100)+rand...

presque 3 ans il y a | 0

Réponse apportée
Scatter datatips won’t display with callback
You can enable datatip using a couple of commands: see DOC1 Also, you can make it interactive: see DOC2

presque 3 ans il y a | 0

Réponse apportée
How can we determine how many peaks are at each plot?
Use findpeaks() fcn: see DOC e.g.: t = linspace(0, 2, 1000); % Time fs = 1/t(2); % Sampling freq [Hz] f...

presque 3 ans il y a | 0

Réponse apportée
Integration with Symbolic Variables
Use integral() - see DOC E.g.: % Step 1. Create a function handle: F = @(theta, a)sqrt((a*(1-cos(theta))).^2+(a*(1-sin(theta)...

presque 3 ans il y a | 0

Réponse apportée
How do I get smooth edges for a contourf plot on a log-log scale scatterplot?
Here is how you can get the straight lines along edges: MFR_1 = [0.93016, 0.13933, 0.04154; 4.75072, 0.96454, 0.27638; 16.1767,...

presque 3 ans il y a | 0

Réponse apportée
How can I input values?
You code contains several crucial errors including wrong call of fcn, wrong placements of commands after the fcn file, wrong inp...

presque 3 ans il y a | 0

Réponse apportée
How to make the error below each other in the text box
Use { } in strcat() and ; (semicolon), to start a new error message from the following line in your msgbox. Here is the correcte...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Integration when some of the values change over time
Simply write a code, e.g.: t=linspace(0, 5, 200); F = 5*cos(2*pi*t); xk = 2*sin(2*pi*5*t); x = linspace(0,25); for ii = 1:n...

presque 3 ans il y a | 0

Réponse apportée
i couldnt able to slove this please help me
Provide your parameter values Twr, Wr_ref, Tbeta, Kwr, etc.

presque 3 ans il y a | 0

Réponse apportée
How to make the error below each other in the text box
Here is how I would do (see my some arbitrary numerical values for display): msg_V_breadth_min = sprintf('#2 Error Loading Para...

presque 3 ans il y a | 0

Réponse apportée
I want to use an optimization algorithm for solving a function. I prefer to use a new algorithm (recently introduced). Any suggestion? Its code should be availabel on m
See the new release MATLAB 2023a and its newly added functions: SEE

presque 3 ans il y a | 0

Réponse apportée
Problems with circuit breaker.
Are you using the right converter block from Simulink to PS?

presque 3 ans il y a | 0

Réponse apportée
How can I plot from csv file?
Here is how to get some shadow error plot: % Way 1. Not nice looking plot D = readmatrix('https://www.mathworks.com/matlabcent...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to draw a CIELAB color chart?
Here are several fcn files on MATLAB file exchange to visualize cielab plot: https://www.mathworks.com/matlabcentral/fileexchang...

presque 3 ans il y a | 0

Réponse apportée
Reading '*.xlsm' files
There might be another case that your intended data file(s) is (are) open and cursor is inside the file.

presque 3 ans il y a | 0

Réponse apportée
Table element access problem
Use this standard syntax to read the data from MS Excel into a table array: % Way 1: Simple one MY_file = 'DATA_Exp.xlsx'; ...

presque 3 ans il y a | 0

Réponse apportée
How to get effective parameter graph?
Without seeing your data, one quick suggestion is: Using yyaxis option for two different data sets and use y-axis limit, e.g.: ...

presque 3 ans il y a | 0

Réponse apportée
error "Index in position 2 exceeds array bounds. Index must not exceed 6."
Here is the corrected code. Note ny is to be for j and nx is for j. The order was swaped. E = 207e9; % Modulus of elasticity (...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Weighted Average for a certain depth
For the weighted mean calcution - see this MATLAB submission -

presque 3 ans il y a | 0

Réponse apportée
Easiest way to make input dialog box with multiple checkboxes?
Here are a couple of good docs - DOC1, DOC2

presque 3 ans il y a | 0

Réponse apportée
Using the fourier series to approximate a triangular wave.
Here is one simple code how to generate sawtooth approximation using different Fourier series: t = linspace(0, 10, 1000); Phas...

presque 3 ans il y a | 0

Réponse apportée
Create a step in a graph
In this exercise, no need to use a loop to obtain a step fcn. Way1 is using simple matrix operation: aux1=70*1200; aux2=7...

presque 3 ans il y a | 0

| A accepté

Charger plus