답변 있음

I tried plot a 3d animated but it doesn't work.

I think you want to use scatter3 and not plot3. See below for a demonstration, i commented some line to run it in the browser (w...

I tried plot a 3d animated but it doesn't work.

I think you want to use scatter3 and not plot3. See below for a demonstration, i commented some line to run it in the browser (w...

2달 전 | 0

| 수락됨

답변 있음

How di I make concise multiple parameter calls?

One way to do this is by storing the data (or params as you call them) in a cell array, see below for an example. MyString = ['...

How di I make concise multiple parameter calls?

One way to do this is by storing the data (or params as you call them) in a cell array, see below for an example. MyString = ['...

2달 전 | 0

| 수락됨

답변 있음

Index in position 1 exceeds array bounds (must not exceed 7).

I indicated in your script where the issue lies, in short: P is a 7x2 matrix. when kk == length(k), it means that k(kk) = 7 ...

Index in position 1 exceeds array bounds (must not exceed 7).

I indicated in your script where the issue lies, in short: P is a 7x2 matrix. when kk == length(k), it means that k(kk) = 7 ...

2달 전 | 0

| 수락됨

답변 있음

3D point plotting

you can use the plot3 function to plot a 3D line, see below for a demonstration. L1 = 26; R1 = [16 ;17 ; 19 ;25 ;26 ; 27 ; ...

3D point plotting

you can use the plot3 function to plot a 3D line, see below for a demonstration. L1 = 26; R1 = [16 ;17 ; 19 ;25 ;26 ; 27 ; ...

2달 전 | 0

| 수락됨

답변 있음

How do you change the asterisks in the first string to the characters in the same positions in the second string?

See below for one method. string1 = 'v**de***t'; string2 = 'eolehmors'; % find location of the asterisks idx = string1 == ...

How do you change the asterisks in the first string to the characters in the same positions in the second string?

See below for one method. string1 = 'v**de***t'; string2 = 'eolehmors'; % find location of the asterisks idx = string1 == ...

2달 전 | 0

| 수락됨

답변 있음

How to display only few values in a plot rather than for whole points in a big array?

See below for a demonstration, i had to assume some parameters. However the plotting princaple remains the same. % these parame...

How to display only few values in a plot rather than for whole points in a big array?

See below for a demonstration, i had to assume some parameters. However the plotting princaple remains the same. % these parame...

2달 전 | 0

| 수락됨

답변 있음

Join two table variables into one. == does not works of table type

I think one of the issues is the nan in the data, the result of nan == nan is something for philosophers :) Anyhow, see below f...

Join two table variables into one. == does not works of table type

I think one of the issues is the nan in the data, the result of nan == nan is something for philosophers :) Anyhow, see below f...

2달 전 | 0

| 수락됨

답변 있음

How to get all positive values in following code

Im modified the code a bit, see below for the adjustments and some coments in the code. I stored the T values along with the i ...

How to get all positive values in following code

Im modified the code a bit, see below for the adjustments and some coments in the code. I stored the T values along with the i ...

2달 전 | 0

답변 있음

displaying images in random order using 'imread' function

one method could be the following: % number of images numImg = 4; % random permutation of the integers 1:numImg imgIdx = ran...

displaying images in random order using 'imread' function

one method could be the following: % number of images numImg = 4; % random permutation of the integers 1:numImg imgIdx = ran...

2달 전 | 0

| 수락됨

답변 있음

formula for changing the base of a logarithm is: loga(N) = (logb(N))/(logb(a)) (a) Use MATLAB's function log (x) to calculate log4(0.085)

You can create a function handle to eval the desired base: log4_fun = @(x) log(x) / log(4) log4_fun(0.85)

formula for changing the base of a logarithm is: loga(N) = (logb(N))/(logb(a)) (a) Use MATLAB's function log (x) to calculate log4(0.085)

You can create a function handle to eval the desired base: log4_fun = @(x) log(x) / log(4) log4_fun(0.85)

3달 전 | 0

답변 있음

Efficient submatrix product computation

Do note that a for loop can be very efficient. I'm not sure the single line methods will always be faster. Below you can find o...

Efficient submatrix product computation

Do note that a for loop can be very efficient. I'm not sure the single line methods will always be faster. Below you can find o...

3달 전 | 1

| 수락됨

답변 있음

Adding parameter to file name string when saving a figure using savefig or figsave

Do you mean savefig? See below fo a method to create the filename as you indicate and a demo to save and open the figure. CHANN...

Adding parameter to file name string when saving a figure using savefig or figsave

Do you mean savefig? See below fo a method to create the filename as you indicate and a demo to save and open the figure. CHANN...

3달 전 | 0

답변 있음

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

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

3달 전 | 1

| 수락됨

답변 있음

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

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

3달 전 | 1

답변 있음

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

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

3달 전 | 0

답변 있음

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

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

3달 전 | 0

답변 있음

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

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

3달 전 | 0

답변 있음

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

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

3달 전 | 0

| 수락됨

답변 있음

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

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

3달 전 | 0

답변 있음

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

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

3달 전 | 0

| 수락됨

답변 있음

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

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

3달 전 | 0

답변 있음

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

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

3달 전 | 0

| 수락됨

답변 있음

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

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

3달 전 | 2

| 수락됨

답변 있음

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

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

3달 전 | 0

| 수락됨

답변 있음

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

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

3달 전 | 1

답변 있음

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

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

3달 전 | 0

| 수락됨

답변 있음

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

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

3달 전 | 1

답변 있음

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

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

3달 전 | 0

답변 있음

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

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

3달 전 | 0

| 수락됨

답변 있음

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

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

3달 전 | 0