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

23 hours 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));

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

23 hours ago | 0

Answered

How to change a value in one column dependent on another table column?

a=unique(table1.Var2); for k=1:length(a) b=find(table1.Var2==a(k)); for j=2:length(b) table1.Var1(b(j))=table1.Var1(...

How to change a value in one column dependent on another table column?

a=unique(table1.Var2); for k=1:length(a) b=find(table1.Var2==a(k)); for j=2:length(b) table1.Var1(b(j))=table1.Var1(...

2 days ago | 0

| accepted

Answered

adding noise to images

black=find(image==0); white=randperm(length(black),floor(x/100*length(black))); image(white)=uint8(255);

adding noise to images

black=find(image==0); white=randperm(length(black),floor(x/100*length(black))); image(white)=uint8(255);

2 days ago | 0

Answered

Make if statement more readable

if numel(intersect(VID1{index(1)},VID2{index(2)}))||... numel(intersect(VID2{index(2)},VID3{index(3)}))||... n...

Make if statement more readable

if numel(intersect(VID1{index(1)},VID2{index(2)}))||... numel(intersect(VID2{index(2)},VID3{index(3)}))||... n...

2 days ago | 0

| accepted

Answered

why is my plot not working

t=1:10; F=1./(4.^t)-1./(5.^t); plot(t,F);

why is my plot not working

t=1:10; F=1./(4.^t)-1./(5.^t); plot(t,F);

2 days ago | 2

| accepted

Answered

How to call columns of matrices using 'for loop' ?

s=diag(S); for i=1:3 Approx(:,:,i)=U(:,i)*V(:,i)'*s(i);%I am assuming this is what you want, s(i) being scalar along the dia...

How to call columns of matrices using 'for loop' ?

s=diag(S); for i=1:3 Approx(:,:,i)=U(:,i)*V(:,i)'*s(i);%I am assuming this is what you want, s(i) being scalar along the dia...

2 days ago | 0

Answered

How to split .mat file data into different variables?

a=readmatrix('yourData'); m=reshape(a,1024,[]);%why not just keep in a matrix that you can index into?

How to split .mat file data into different variables?

a=readmatrix('yourData'); m=reshape(a,1024,[]);%why not just keep in a matrix that you can index into?

3 days ago | 0

| accepted

Answered

How to apply a colormap to rgb image ?

I=imread('Capture3.PNG'); I_gray= im2gray(I); imshow(I_gray); colormap('jet');

How to apply a colormap to rgb image ?

I=imread('Capture3.PNG'); I_gray= im2gray(I); imshow(I_gray); colormap('jet');

3 days ago | 1

Answered

Remove corresponding values in two arrays

A = [9,1,5,2,3,2] ; B = [12,23,41,4,10,6]; x = [1,2,5,9,]; % values to keep in A new_A = A(ismember(A,x)); new_B = B(ismemb...

Remove corresponding values in two arrays

A = [9,1,5,2,3,2] ; B = [12,23,41,4,10,6]; x = [1,2,5,9,]; % values to keep in A new_A = A(ismember(A,x)); new_B = B(ismemb...

3 days ago | 0

| accepted

Answered

Code with function file not working

No reason for global variables. Problem is equation P=X*(1+r/100)^t;%need X*

Code with function file not working

No reason for global variables. Problem is equation P=X*(1+r/100)^t;%need X*

3 days ago | 1

Answered

Symbolic expressions inside of array

syms x y f = x^2; g = y^3; a = [f,g]; subs(a,x,3);

Symbolic expressions inside of array

syms x y f = x^2; g = y^3; a = [f,g]; subs(a,x,3);

3 days ago | 0

| accepted

Answered

for loop outsite functions

Can't you just put the loop in your pushbutton function and pass the loop variable to your other functions? function Messungsta...

for loop outsite functions

Can't you just put the loop in your pushbutton function and pass the loop variable to your other functions? function Messungsta...

4 days ago | 0

Answered

Only saving last run for loop

pie(1)=0; for i=1: 560; z=z+dz; pie(i+1)=pie(i)-((g/(cp*thetav(z)))*z); end

Only saving last run for loop

pie(1)=0; for i=1: 560; z=z+dz; pie(i+1)=pie(i)-((g/(cp*thetav(z)))*z); end

6 days ago | 1

| accepted

Answered

implement the A matrix using for loop

Why do you need a for-loop? Looks like you have the idea. A=zeros(2*length(x),6); A(1:2:end,1)=x; A(1:2:end,2)=y; A(1:2:end,...

implement the A matrix using for loop

Why do you need a for-loop? Looks like you have the idea. A=zeros(2*length(x),6); A(1:2:end,1)=x; A(1:2:end,2)=y; A(1:2:end,...

8 days ago | 0

| accepted

Answered

Creating a histogram,

Use histogram(), the matlab documentation is quite good. https://www.mathworks.com/help/matlab/ref/matlab.graphics.chart.primit...

Creating a histogram,

Use histogram(), the matlab documentation is quite good. https://www.mathworks.com/help/matlab/ref/matlab.graphics.chart.primit...

8 days ago | 0

Answered

Indexing a value from other cell arrays into a new column

for k=1:size(distances,1) a=flip(indeces(distances(k,1),:)); distances(k,3)=arrays(a(1),a(2)); end

Indexing a value from other cell arrays into a new column

for k=1:size(distances,1) a=flip(indeces(distances(k,1),:)); distances(k,3)=arrays(a(1),a(2)); end

9 days ago | 0

| accepted