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?

22 hours 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');

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

22 hours 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*

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

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

2 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

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

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

6 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

7 days ago | 0

| accepted

Answered

Defining an anonymous function with 3*(N+1) variables

f=prod(exp(-beta*(diff(x(1:n+1)).^2+diff(x(n+2:2*n+2)).^2+diff(x(2*n+3:3*n+3)).^2)))*sum((x(1:n+1)-x(1:n+1)').^2+(x(n+2:2*n+2)-x...

Defining an anonymous function with 3*(N+1) variables

f=prod(exp(-beta*(diff(x(1:n+1)).^2+diff(x(n+2:2*n+2)).^2+diff(x(2*n+3:3*n+3)).^2)))*sum((x(1:n+1)-x(1:n+1)').^2+(x(n+2:2*n+2)-x...

7 days ago | 0

| accepted

Answered

line 15 does not work

If you inspect your variables before plotting, you will find that y is a single column. plot(t,y,'-');%this will work in your c...

line 15 does not work

If you inspect your variables before plotting, you will find that y is a single column. plot(t,y,'-');%this will work in your c...

7 days ago | 0

| accepted

Answered

How to solve an elliptical integral with the unknown in the integrand?

If you plot for C=0:100, you find that bcInt never exceeds 1. Re = 100; alpha = 15/360*2*pi; x=0:100; bc = @(f, C) 1./(((1-f...

How to solve an elliptical integral with the unknown in the integrand?

If you plot for C=0:100, you find that bcInt never exceeds 1. Re = 100; alpha = 15/360*2*pi; x=0:100; bc = @(f, C) 1./(((1-f...

8 days ago | 1

Answered

How to add numeric values to cell array?

for k=1:length(names) names{k}=[names{k},' ',num2str(val(k))]; end

How to add numeric values to cell array?

for k=1:length(names) names{k}=[names{k},' ',num2str(val(k))]; end

8 days ago | 0

Answered

How to store words and numbers table in an array

Why not set up a struct? s = struct('a',{},'b',{},'c',{});%label the fields to whatever you want for k=1:11 s(k).a=%'Buildi...

How to store words and numbers table in an array

Why not set up a struct? s = struct('a',{},'b',{},'c',{});%label the fields to whatever you want for k=1:11 s(k).a=%'Buildi...

8 days ago | 0

Answered

how to use fzero function?

First, fzero finds roots of nonlinear functions and should not be symbolic. If you have a polynomial you should use roots() func...

how to use fzero function?

First, fzero finds roots of nonlinear functions and should not be symbolic. If you have a polynomial you should use roots() func...

8 days ago | 0

Answered

How to "invert" integral function?

I might not understand your question completely. If you know the temperature and interested wavelength range, the curve can be g...

How to "invert" integral function?

I might not understand your question completely. If you know the temperature and interested wavelength range, the curve can be g...

8 days ago | 1

Answered

How to stop rounding values when i use array?

The values in your array (a) are not rounded, they are only rounded in the display of them. To see the actual values, change for...

How to stop rounding values when i use array?

The values in your array (a) are not rounded, they are only rounded in the display of them. To see the actual values, change for...

8 days ago | 0

Solved

Consecutive Equation Times (of the day)

Many times throughout the day can represent mathematical equations. In this problem, we focus on the largest consecutive run of ...

9 days ago

Solved

Equation Times (of the day)

Many times throughout the day can represent mathematical equations. In this problem, we focus on times that include the four bas...

9 days ago

Solved

center of mass

R is a given matrix with size [n,2]. R(i,:) is interpreted as the 2D-position of a mass point with mass i. Calculate the center ...

9 days ago

Solved

Bernoulli's Equation

Bernoulli's equation states that for an incompressible fluid the following summation is constant across the flow: v^2/2 + g*z + ...

9 days ago

Answered

Trying to solve a four variable equation for a range of values

If you want all possible combinations, then use ndgrid. Z0=1.5; Fmin=0:10; Rn=1:20; gammas=-10:1; gammopt=13:.1:20;%I have ...

Trying to solve a four variable equation for a range of values

If you want all possible combinations, then use ndgrid. Z0=1.5; Fmin=0:10; Rn=1:20; gammas=-10:1; gammopt=13:.1:20;%I have ...

9 days ago | 0

Answered

How write closed interval inside loop

You should just make g1, g2, and g3 matrices. No loop is necessary. g1=[l1',m1'-2*v1',m1'+3*v1',2*u1']; g2=[l2',m2'-4*v2',m2'+...

How write closed interval inside loop

You should just make g1, g2, and g3 matrices. No loop is necessary. g1=[l1',m1'-2*v1',m1'+3*v1',2*u1']; g2=[l2',m2'-4*v2',m2'+...

10 days ago | 0

| accepted