Answered

how to solve a 5th degree equation and write a loop function with it

use the functions syms and solve: syms x solve(x==a*b*(1-x)^5)

how to solve a 5th degree equation and write a loop function with it

use the functions syms and solve: syms x solve(x==a*b*(1-x)^5)

1 month ago | 0

Answered

Create results .txt files with loop

you can create txt files with: FP=fopen(sprintf('test%g.txt',1),'wt'); fprintf(FP,num2str(data)); fclose(FP);

Create results .txt files with loop

you can create txt files with: FP=fopen(sprintf('test%g.txt',1),'wt'); fprintf(FP,num2str(data)); fclose(FP);

2 months ago | 0

| accepted

Answered

How can I make a scatter plot with different markers ?

maybe somthing like this: symbol_list=['*';'+';'o';'<']; for i=1:4 scatter(x(:,i),y(:,i),symbol_list(i)) hold on en...

How can I make a scatter plot with different markers ?

maybe somthing like this: symbol_list=['*';'+';'o';'<']; for i=1:4 scatter(x(:,i),y(:,i),symbol_list(i)) hold on en...

2 months ago | 0

Answered

Create row with text from loop for a table

you can create table headers with: a=table(); for i=1:10; a.(sprintf('bar %g',i))=i; end

Create row with text from loop for a table

you can create table headers with: a=table(); for i=1:10; a.(sprintf('bar %g',i))=i; end

2 months ago | 0

| accepted

Answered

Continuous Spectrogram from multiple wav files.

Something like this: data_tot=[]; >> for i=1:numel(files) data=audioread(files(i)); data_tot=[data_tot ; data]; end...

Continuous Spectrogram from multiple wav files.

Something like this: data_tot=[]; >> for i=1:numel(files) data=audioread(files(i)); data_tot=[data_tot ; data]; end...

2 months ago | 0

| accepted

Answered

how to identify leap years

There is a leap year every four years, so you can use this: if mod(year,4)==0 'leap year' else 'not a leap year' en...

how to identify leap years

There is a leap year every four years, so you can use this: if mod(year,4)==0 'leap year' else 'not a leap year' en...

2 months ago | 0

Answered

Creating a data matrix that self generates.

somthing like this: count=0; m=zeros(100,1); rand_int=datasample(1:100,1); m(rand_int)=1; old_matrix=reshape(m,[10 10]); f...

Creating a data matrix that self generates.

somthing like this: count=0; m=zeros(100,1); rand_int=datasample(1:100,1); m(rand_int)=1; old_matrix=reshape(m,[10 10]); f...

2 months ago | 1

Answered

how can i solve this error?

You should use this: x=1:0.1:6; for i=1:numel(x) h(i,:)=z2+(x(i)-ls)*z4; end or even without ':' x=1:0.1:6; for i=1:numel...

how can i solve this error?

You should use this: x=1:0.1:6; for i=1:numel(x) h(i,:)=z2+(x(i)-ls)*z4; end or even without ':' x=1:0.1:6; for i=1:numel...

2 months ago | 0

| accepted

Answered

print the element of a matrix

a=-Inf; for i=1:numel(matrix(:,1)) if matrix(i,1)>a; a=matrix(i,1); end end disp(a)

print the element of a matrix

a=-Inf; for i=1:numel(matrix(:,1)) if matrix(i,1)>a; a=matrix(i,1); end end disp(a)

2 months ago | 1

Answered

print the element of a matrix

You can use: a=max(matrix(1,:)); disp(a) to disp the max value from the first row, or b=max(matrix(:,1)); disp(b) to ge...

print the element of a matrix

You can use: a=max(matrix(1,:)); disp(a) to disp the max value from the first row, or b=max(matrix(:,1)); disp(b) to ge...

2 months ago | 0

| accepted

Answered

How to join two points, on a 'map', created with the command 'ginput'?

You can use this code, which contains the function ginput_norm: https://nl.mathworks.com/matlabcentral/fileexchange/75469-ginput...

How to join two points, on a 'map', created with the command 'ginput'?

You can use this code, which contains the function ginput_norm: https://nl.mathworks.com/matlabcentral/fileexchange/75469-ginput...

2 months ago | 0

Submitted

ginput with normalized coordinates of the figure window.

Graphical input from mouse.

2 months ago | 4 downloads |

Answered

replace updated data with previous data in Matlab while Matlab and excel are linked.

Make a while loop in which matlab reads the data from the excel file every minute or every hour. You can generate a script that ...

replace updated data with previous data in Matlab while Matlab and excel are linked.

Make a while loop in which matlab reads the data from the excel file every minute or every hour. You can generate a script that ...

3 months ago | 0

| accepted

Answered

Reading and Replace lines in input data for many lines

What about creating a new txt file in every loop and overwriting the existing file2.txt instead of replacing lines?

Reading and Replace lines in input data for many lines

What about creating a new txt file in every loop and overwriting the existing file2.txt instead of replacing lines?

3 months ago | 0

Answered

What is z1 appearing when solving this nonlinear system for x y and z?

You can try to use the function vpasolve instead of solve

What is z1 appearing when solving this nonlinear system for x y and z?

You can try to use the function vpasolve instead of solve

4 months ago | 1

Answered

Legend with different text color and Latex Interpreter

I dont think it is possible to change the color with the latex interpreter. It can be used to make text bold for example and ins...

Legend with different text color and Latex Interpreter

I dont think it is possible to change the color with the latex interpreter. It can be used to make text bold for example and ins...

4 months ago | 0

Answered

How can I create a point shapefile from a csv (or matrix) with lat/long columns?

Im not sure what you want, but maybe this can help: for i=1:1780 T.(sprintf('var%g',i))=sprintf('var%g',i); end This cre...

How can I create a point shapefile from a csv (or matrix) with lat/long columns?

Im not sure what you want, but maybe this can help: for i=1:1780 T.(sprintf('var%g',i))=sprintf('var%g',i); end This cre...

4 months ago | 0

Answered

plot fails with -Inf

you can use Px(isinf(abs(Px)))=0; to set all -Inf values to 0

plot fails with -Inf

you can use Px(isinf(abs(Px)))=0; to set all -Inf values to 0

4 months ago | 0

Answered

How do I display the output of my stats_

Im not sure what you mean. With the command 'gcf' you get all the stats of the figure. The stats of the maskImage are in your ...

How do I display the output of my stats_

Im not sure what you mean. With the command 'gcf' you get all the stats of the figure. The stats of the maskImage are in your ...

4 months ago | 0

Answered

How can I perform region growing with two seed points?

Can you upload an image, and give examples of the values: I,x,y,x2,y2,reg_maxdist1,reg_maxdist2, then we can run the code and ch...

How can I perform region growing with two seed points?

Can you upload an image, and give examples of the values: I,x,y,x2,y2,reg_maxdist1,reg_maxdist2, then we can run the code and ch...

4 months ago | 0

| accepted

Answered

Creating a run log/count with a for loop within a table.

I think this is what you are looking for: switch_list=zeros(length(data),1); switch_list(2:end)=data(2:end,2)-data(1:end-1,2);...

Creating a run log/count with a for loop within a table.

I think this is what you are looking for: switch_list=zeros(length(data),1); switch_list(2:end)=data(2:end,2)-data(1:end-1,2);...

4 months ago | 0

Answered

How to extract values from an array?

val1 contains the numbers x(1), x(2) x(3) and x(4). val2 contains the numbers between x(1) and x(4) with steps on 1, but x(4) is...

How to extract values from an array?

val1 contains the numbers x(1), x(2) x(3) and x(4). val2 contains the numbers between x(1) and x(4) with steps on 1, but x(4) is...

4 months ago | 0

Answered

How do I find a center of rotation having a set of 3D points ?

If each point represent the same amount of mass, the center of rotation is just the average position of all poisitions, when eac...

How do I find a center of rotation having a set of 3D points ?

If each point represent the same amount of mass, the center of rotation is just the average position of all poisitions, when eac...

4 months ago | 0

Answered

how can i split a 400*400 matrix into smaller one

what about this: num_list=0:40:400; data=[]; Image=zeros(400); for a=1:numel(num_list)-1 for b=1:numel(num_list)-1 ...

how can i split a 400*400 matrix into smaller one

what about this: num_list=0:40:400; data=[]; Image=zeros(400); for a=1:numel(num_list)-1 for b=1:numel(num_list)-1 ...

5 months ago | 0

Answered

save data to a new row in a table for each iteration of a for loop

something like this might be useful for you: data=[]; for i=1:0.1:10 data(:,end+1)=[i^2;i^3];%just example of data end

save data to a new row in a table for each iteration of a for loop

something like this might be useful for you: data=[]; for i=1:0.1:10 data(:,end+1)=[i^2;i^3];%just example of data end

5 months ago | 0

Answered

It's posible to make figure always maximized and block minimized option?

You can do this with position function of a handle: h=figure(); h.Position=[1,41,1536,749] % depends on your screen size, 1 41...

It's posible to make figure always maximized and block minimized option?

You can do this with position function of a handle: h=figure(); h.Position=[1,41,1536,749] % depends on your screen size, 1 41...

5 months ago | 0

Answered

How not to delete one element of a figure when using cla?

Maybe you can delete one of the 'Children' of the figure. type: h.Children and check if there is any data that can be delete...

How not to delete one element of a figure when using cla?

Maybe you can delete one of the 'Children' of the figure. type: h.Children and check if there is any data that can be delete...

5 months ago | 0

Answered

Computing an specific numerical Integral

I think you should use a Riemann integral to estimate the answer of this integral. Or maybe wolfram Mathematica can solve it f...

Computing an specific numerical Integral

I think you should use a Riemann integral to estimate the answer of this integral. Or maybe wolfram Mathematica can solve it f...

5 months ago | 0

Answered

How to copy files form one directory to another

cd('source_folder') filenames=dir; for i=3:length(filenames) copyfile(filenames(i).name,'destination_folder') end

How to copy files form one directory to another

cd('source_folder') filenames=dir; for i=3:length(filenames) copyfile(filenames(i).name,'destination_folder') end

5 months ago | 0

Submitted

steppermotor

Easy control of a bipolar (4 cable) stepper motor, power by usb port and controlled with audio signal via the audio jack output....

5 months ago | 3 downloads |