Réponse apportée
How to use IF statements to find data greater than or equal to a certain amount
see below for a demonstration Time = [1 2 3 4 5 6 7 8 9]'; Capacitance = [0.3 0.5 0.8 1 1.3 1.4 1.2 0.9 0.5]'; MyTable = ta...

plus d'un an il y a | 1

| A accepté

Réponse apportée
I get wrong logic while I compare two datetimes
Note that isbetween(t,tlower,tupper) is used to check the following logic: tlower <= t & t <= tupper. See below for the code ru...

presque 2 ans il y a | 1

Réponse apportée
Connecting dots with spline or polinomial on an image to process it later
There are multiple ways to do this, here is one example using a file exchange function to subsaple the spline and make a smooth ...

presque 2 ans il y a | 0

Réponse apportée
How to create a counter to store multiple solutions
Since you have a double loop, the easiest method will be to add a variable e.g. counter. Initialize it to zero, and then add 1 t...

presque 2 ans il y a | 0

Réponse apportée
compare 1X6 cell data with Structure
you can use the contains function do determine if the desired name is in the folder name. See below for the procedure. The resul...

presque 2 ans il y a | 0

Réponse apportée
Can't get my code to execute
There were some minor mistakes, see below for the code with inline comments to explain the differences. A = 1.325; B = 3.7; ...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How to print multiple Values using sprintf In matlab
This is due to the amount %d you have used. Only use 2 of them for DS Value and 19 for DS Length update added a 'print string' ...

presque 2 ans il y a | 0

Réponse apportée
Getting dimension indexes based on element index
You can use the ind2sub function for this (link --> Convert linear indices to subscripts - MATLAB ind2sub (mathworks.com) ) See...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How to extract a string before a number?
You can use the regexp function to find the indexes for the numbers. Then you can split the char array using that index (minus o...

presque 2 ans il y a | 0

Réponse apportée
Sum selected columns of a matrix
One approach is shown below, there are some comments to explain the steps. A = [0.0486947932834768 0.590504451038576 0 0.057986...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
Unexpected result at interpolating values from scattered data
You could try another approach, by first fitting a curve trough the points of the two lines. Then evaluating those line alone eq...

presque 2 ans il y a | 2

| A accepté

Réponse apportée
Date time conversion fail
From the looks of it, you need to change the months (M) and minutes (m) symbols in your time format to convert the string into e...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How to find '1' for the second time in a matrix by row wise
If you don't mind using a loop, you can do this the follwing way: A = [ 0 0 1 0 0 0 0 0 1 1 0 0; 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0...

presque 2 ans il y a | 1

Réponse apportée
did I plot the "r" factor correctly in it?
at first glance you still need to take the absolute value, see below ti = 0; tf = 1E-4; tspan=[ti tf]; y0=[1; 1; 1; 1; 1; 1;...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
Min between integer and empty array
You can make this work by adding the dimension parameter to the min function, see below X = [1,2,3,4,10,11]; Y = [1,2,3,4,5]; ...

presque 2 ans il y a | 1

Réponse apportée
How to plot like the following figure in Matlab?
Yes, to omit some data points you can introduce NaN into the y data. See below for an example. x_data = 1:100; y_data = rand(1...

presque 2 ans il y a | 0

Réponse apportée
While loop and optimization
You can change the condition for the while loop to reflect this, see below for an example t = 0.1; t_max = 0.35; while t <=...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
I am getting error like invalid expression
the error is located in syntax of the run_L_p function. You need to change the numeric values into variables i.e. change funct...

presque 2 ans il y a | 0

Réponse apportée
Setting XTicks with Datetime reuslt in an error
you can use datetimes directly as ticks. To make sure that all ticks are shown you can use the xticks command, and for readabili...

presque 2 ans il y a | 0

Réponse apportée
Index in position 2 exceeds array bounds (must not exceed 1).
The error is due to the way you are accesing the data, based on you picture the inputs are row vectors. IS is a 1x6 vector. Howe...

presque 2 ans il y a | 0

Réponse apportée
How to split a string and make multiple rows from the original data for each split?
Hi, there are several methods to do this. One way is to create an index vector and use this to copy the variable. See below :) ...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
For Loops using functions
if you do not want te keep the data from each iteration you can simply overwrite it i.e. use the same variable as input and outp...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How to flot the function f(x,y)=(x^(2)+y^(2)) ℯ^(y^(2)-x^(2))
Hi, you can use the procedure below to investigate the range you are interested in. % create the function Fun = @(x,y) (x.^2+y...

presque 2 ans il y a | 0

Réponse apportée
How do I add data from one table to another?
Hello, you can simply append the tables, see below for an example Var1 = ["A";"B";"C";"D";"E"]; Var2 = [1;2;3;4;5]; Var3 = lo...

presque 2 ans il y a | 0

Réponse apportée
Write matlab code for the following algorithm
I'm not familiar with the algoritm, so it could still have some mistakes left... However, i was able to identify a couple of mi...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How set table column to modified data?
See below, you can first extract the column names from the table. And use these as index during the loop. loadfile = load(websa...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How to find X and Y coordinates of maximum gap between curves?
It depends on what you mean with the gap, notice that you plot it on a logarithmic axis. As a result from a graphical point of v...

presque 2 ans il y a | 3

| A accepté

Réponse apportée
i need the curve of this fourier series
see below for a demo on how to set this up % set up the x values x = linspace(-3*pi, 3*pi, 1e3); % assume 10 terms for the ...

presque 2 ans il y a | 0

Réponse apportée
Match numbers to allocate text
you can use the categorical command to do this: y = [12 13 19 24 21 12 12]'; B = categorical( y, [12 13 19 21], ["A" "B" "C"...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How to build a 3d map from raw data?
If you want to plot the curves in 3D, you can use the plot3 command. See below for an example: % read the data opts = spreadsh...

presque 2 ans il y a | 0

Charger plus