Answered

How can I select numbers from excel to matlab?

str=readcell('test.xlsx'); %str={'2019-10-12T02:41:27.091Z,1/0669958925:52238,-5.9858581261e-02,-1.7725070822e-04,+1.1940838453...

How can I select numbers from excel to matlab?

str=readcell('test.xlsx'); %str={'2019-10-12T02:41:27.091Z,1/0669958925:52238,-5.9858581261e-02,-1.7725070822e-04,+1.1940838453...

ongeveer 8 uur ago | 0

Answered

How to fix the range of a variable?

Not clear what the question is, but if you just want to randomly sectect 24 digits from 0-3, then: x=randi(4,1,24)-1;

How to fix the range of a variable?

Not clear what the question is, but if you just want to randomly sectect 24 digits from 0-3, then: x=randi(4,1,24)-1;

ongeveer 11 uur ago | 0

Answered

How to plot the Free particle wave function

a=10; c1=pi*sqrt(2*a); h=(6.626/(2*pi))*10^-34; m=9.11*10^-31; X=-60:.1:60; t=m*a^2/h; V=zeros(1,201); for j=1:length(X) ...

How to plot the Free particle wave function

a=10; c1=pi*sqrt(2*a); h=(6.626/(2*pi))*10^-34; m=9.11*10^-31; X=-60:.1:60; t=m*a^2/h; V=zeros(1,201); for j=1:length(X) ...

ongeveer 12 uur ago | 0

| accepted

Answered

Use Position Values to Keep Values in Matrix

Filled=Filling.*(cumsum(Volume<0,2)==1);

Use Position Values to Keep Values in Matrix

Filled=Filling.*(cumsum(Volume<0,2)==1);

ongeveer 13 uur ago | 0

| accepted

Answered

How to find vector elements indices for the first and last locations of a specific number?

[~,idxfirst]=ismember(unique(A),A); [~,idxlast]=ismember(unique(A),flip(A)); idxlast=length(A)+1-idxlast;

How to find vector elements indices for the first and last locations of a specific number?

[~,idxfirst]=ismember(unique(A),A); [~,idxlast]=ismember(unique(A),flip(A)); idxlast=length(A)+1-idxlast;

ongeveer 15 uur ago | 1

| accepted

Answered

How to fitt a power function to data

If you have the curve fitting toolbox. f=fit(x,y,'power1');

How to fitt a power function to data

If you have the curve fitting toolbox. f=fit(x,y,'power1');

1 dag ago | 0

Answered

Return the value from a specific excel colomn/row

If you don't provide an example, we don't know what the format of lat/long/temp is in. They might be numbers or strings. a=read...

Return the value from a specific excel colomn/row

If you don't provide an example, we don't know what the format of lat/long/temp is in. They might be numbers or strings. a=read...

1 dag ago | 0

Answered

Try to solve System of Linear Equations

A=[1 1;10 45;1 3;10 15]; b=[250;24000;3360;1440]; A\b

Try to solve System of Linear Equations

A=[1 1;10 45;1 3;10 15]; b=[250;24000;3360;1440]; A\b

1 dag ago | 0

Answered

Sum of the series with two variable

[x,t]=meshgrid(0:.01:1,0:.001:.1); u=zeros(size(x)); for n=1:100 u=u+((-1)^n-1)/(n^2)*exp(-n^2*pi^2*t/10).*sin(n*pi*x); en...

Sum of the series with two variable

[x,t]=meshgrid(0:.01:1,0:.001:.1); u=zeros(size(x)); for n=1:100 u=u+((-1)^n-1)/(n^2)*exp(-n^2*pi^2*t/10).*sin(n*pi*x); en...

1 dag ago | 0

| accepted

Answered

I need help with using a while loop

c1 = 0.1; v1 = 0.1; v2 = 1; p = 0; m = 1; while m > 1.000e-5%floating point errors, use > c1 = c1*v1/v2 m = c1*0....

I need help with using a while loop

c1 = 0.1; v1 = 0.1; v2 = 1; p = 0; m = 1; while m > 1.000e-5%floating point errors, use > c1 = c1*v1/v2 m = c1*0....

1 dag ago | 1

Answered

Insert elements of one vector into another in a specific order

B(end+1)=B(end);%B needs 1 more element, just duplicated last element c=[reshape(A,124,[]);reshape(B,2,[])]; c=c(:)';

Insert elements of one vector into another in a specific order

B(end+1)=B(end);%B needs 1 more element, just duplicated last element c=[reshape(A,124,[]);reshape(B,2,[])]; c=c(:)';

1 dag ago | 1

| accepted

Answered

Can't exit a for loop correctly

for num = index_peak-1:-1:1 if ODv(num) > ODv(num+1) baseline = ODv(num+1); break; end end Alterna...

Can't exit a for loop correctly

for num = index_peak-1:-1:1 if ODv(num) > ODv(num+1) baseline = ODv(num+1); break; end end Alterna...

1 dag ago | 0

Answered

finding the corresponding value in a for loop

[~,idx]=max(sum(img597==0));

finding the corresponding value in a for loop

[~,idx]=max(sum(img597==0));

1 dag ago | 0

| accepted

Answered

How can concatenate matrices with dimension expansion.

Why not 25x25x2? img(:,:,1) = imread('0.png'); img(:,:,2) = imread('1.png');

How can concatenate matrices with dimension expansion.

Why not 25x25x2? img(:,:,1) = imread('0.png'); img(:,:,2) = imread('1.png');

2 dagen ago | 1

Answered

Matrix Dimension Must Agree

theta = linspace(0,2*(pi),629); l = linspace((5.1)*lambda,(7.1)*lambda,629); Azimuth = linspace(0,2*(pi),629);%these all need ...

Matrix Dimension Must Agree

theta = linspace(0,2*(pi),629); l = linspace((5.1)*lambda,(7.1)*lambda,629); Azimuth = linspace(0,2*(pi),629);%these all need ...

4 dagen ago | 0

Answered

Read table in .txt to MATLAB

t=readtable('Save_CdCl.txt'); alpha=t.alpha; names=t.Properties.VariableNames; for k=1:length(names) writetable(t(:,k),nam...

Read table in .txt to MATLAB

t=readtable('Save_CdCl.txt'); alpha=t.alpha; names=t.Properties.VariableNames; for k=1:length(names) writetable(t(:,k),nam...

4 dagen ago | 0

Answered

How to use linspace on a matrix

yourMatrix=repmat(linspace(.8112,.6,100)',1,13);

How to use linspace on a matrix

yourMatrix=repmat(linspace(.8112,.6,100)',1,13);

4 dagen ago | 0

Answered

How do i save values for each iteration ?

a = [0.01 0.01 0.01 0.03 0.1 0.2 0.3 0.3 0.3 0.4 0.4 0.4 0.3 0.4 0.5 0.8 0.9 1...

How do i save values for each iteration ?

a = [0.01 0.01 0.01 0.03 0.1 0.2 0.3 0.3 0.3 0.4 0.4 0.4 0.3 0.4 0.5 0.8 0.9 1...

5 dagen ago | 0

| accepted

Answered

Not enough input arguments

y =@(x)1./sqrt(1+x.^2)+exp(-x/5).*cos(sqrt(1+x.^2))-0.0486;%I would just use an anonymous function x=0:.01:10; plot(x,y(x));

Not enough input arguments

y =@(x)1./sqrt(1+x.^2)+exp(-x/5).*cos(sqrt(1+x.^2))-0.0486;%I would just use an anonymous function x=0:.01:10; plot(x,y(x));

5 dagen ago | 0

| accepted

Answered

Average values only next to each other in a matrix

I don't think there is an easy way, but a simple loop works. A = [ 62.9; 63; 83.10; 83; 43; 43; 63; 63.2; 83; 83; 62.90; 62.90 ...

Average values only next to each other in a matrix

I don't think there is an easy way, but a simple loop works. A = [ 62.9; 63; 83.10; 83; 43; 43; 63; 63.2; 83; 83; 62.90; 62.90 ...

5 dagen ago | 0

| accepted