Answered

analytic solution with infinite sum

Here is my attempt Ti = 150; T1 = 300; T2 = 200; L = 1; alpha = 0.1; delta_x = 0.05; delta_t = 0.01; N_time = 51; N_spa...

analytic solution with infinite sum

Here is my attempt Ti = 150; T1 = 300; T2 = 200; L = 1; alpha = 0.1; delta_x = 0.05; delta_t = 0.01; N_time = 51; N_spa...

alrededor de 4 horas ago | 0

Answered

Two curves in one plot with wrong scaling

Use function that fit() returns [fitresult, gof] = fit( xData, yData, ft, opts ); % plot(fitresult,'r') plot(xData,fitresult(...

Two curves in one plot with wrong scaling

Use function that fit() returns [fitresult, gof] = fit( xData, yData, ft, opts ); % plot(fitresult,'r') plot(xData,fitresult(...

alrededor de 4 horas ago | 0

Answered

My Excel writing program does not stop

It this a success? V1 = randi(100,5,5); for i = 1:size(V1,1) vv1 = { num2str(V1(i,:)) }; xlswrite('data.xls',vv1,'sh...

My Excel writing program does not stop

It this a success? V1 = randi(100,5,5); for i = 1:size(V1,1) vv1 = { num2str(V1(i,:)) }; xlswrite('data.xls',vv1,'sh...

alrededor de 7 horas ago | 0

Answered

Hi All,Remove empty [] entries row in Timetable, rmmissing is not removing rows which have empty entries, Please help, thank you very much

I found a way. FInally! A = readtable('data.txt','delimiter','\t',... 'ReadVariableNames',false); % wit...

Hi All,Remove empty [] entries row in Timetable, rmmissing is not removing rows which have empty entries, Please help, thank you very much

I found a way. FInally! A = readtable('data.txt','delimiter','\t',... 'ReadVariableNames',false); % wit...

alrededor de 12 horas ago | 0

| accepted

Answered

How to differentiate a series of functions denoted by varying a parameter i=1,2 in (h_i)?

Mistake that h_1 and h_i and different variables m1stake = 2; m2stake = 3; for i = 1:2 disp(mistake) % doesn't...

How to differentiate a series of functions denoted by varying a parameter i=1,2 in (h_i)?

Mistake that h_1 and h_i and different variables m1stake = 2; m2stake = 3; for i = 1:2 disp(mistake) % doesn't...

alrededor de 14 horas ago | 1

| accepted

Answered

Solving FitzHugh-Nagumo equations using ODE45

Here is my achievement. I don't get about stim. Can you explain more? % du/dt = c1u ( u − a)(1 − u) − c2uv +stim ...

Solving FitzHugh-Nagumo equations using ODE45

Here is my achievement. I don't get about stim. Can you explain more? % du/dt = c1u ( u − a)(1 − u) − c2uv +stim ...

1 día ago | 0

Answered

Convert a vector to single element

Use cells signal = cell(254,1); for i = 1:255-1 signal{i} = dec2bin(i,8); end

Convert a vector to single element

Use cells signal = cell(254,1); for i = 1:255-1 signal{i} = dec2bin(i,8); end

1 día ago | 0

Answered

Plotting an array of vectors

Try following h = get(gca); % h = get(gca,'children'); % or try this y = get(h(1),'ydata'); set(h(1),'ydata',y+50)

Plotting an array of vectors

Try following h = get(gca); % h = get(gca,'children'); % or try this y = get(h(1),'ydata'); set(h(1),'ydata',y+50)

1 día ago | 0

Answered

How could I code for loop with this values?

This script should give you success you are looking for A = [40, 60, 30, 80, 70, 50, 90, 30]; B = A(1); for i = 2:length(A) ...

How could I code for loop with this values?

This script should give you success you are looking for A = [40, 60, 30, 80, 70, 50, 90, 30]; B = A(1); for i = 2:length(A) ...

1 día ago | 2

| accepted

Answered

How to keep column of removed row in matrix

It was harder that i thought clc,clear % create some data A = zeros(10); ix = randi(100,1,10); % random ...

How to keep column of removed row in matrix

It was harder that i thought clc,clear % create some data A = zeros(10); ix = randi(100,1,10); % random ...

1 día ago | 0

| accepted

Answered

Changing equation with loop

Use this Me = sqrt(2./(gamma-1).*((nPratio.^((gamma-1)./gamma))-1)); ind = Me < 1; x = (P0.*sqrt(gamma/R).*Me.*(1+((gamma-1)/...

Changing equation with loop

Use this Me = sqrt(2./(gamma-1).*((nPratio.^((gamma-1)./gamma))-1)); ind = Me < 1; x = (P0.*sqrt(gamma/R).*Me.*(1+((gamma-1)/...

1 día ago | 0

Answered

Need help finding the cartesian coordinates of a projectile in flight.

Here is what i invented clc,clear x1 = 671.4971; y1 = 717.2387; z1 = 0; az1 = 75.1148*pi/180; el1 = 9.3679*pi/180; [u1,...

Need help finding the cartesian coordinates of a projectile in flight.

Here is what i invented clc,clear x1 = 671.4971; y1 = 717.2387; z1 = 0; az1 = 75.1148*pi/180; el1 = 9.3679*pi/180; [u1,...

2 días ago | 0

Answered

Cubic smooth spline plot in 3d for several layers

Maybe you don't need interpolation. I just removed NaN numbers D = importdata('Data.txt'); A = D.data; x = A(:,1); cla ho...

Cubic smooth spline plot in 3d for several layers

Maybe you don't need interpolation. I just removed NaN numbers D = importdata('Data.txt'); A = D.data; x = A(:,1); cla ho...

2 días ago | 0

Answered

Interpolate Points of a 3D Point Cloud?

Use griddata to create surface Use contour3 to create crossection clc,clear load data.txt x = data(:,1); y = data(:,2); z ...

Interpolate Points of a 3D Point Cloud?

Use griddata to create surface Use contour3 to create crossection clc,clear load data.txt x = data(:,1); y = data(:,2); z ...

2 días ago | 0

| accepted

Answered

Why is my scatter plot producing inconsistent results?

I made some changes to your code. Look points = [pd17 ev17 mat17 cai17 mar17 jen17 bla17 sch17 jam17 nad17 pd18 ev18 c...

Why is my scatter plot producing inconsistent results?

I made some changes to your code. Look points = [pd17 ev17 mat17 cai17 mar17 jen17 bla17 sch17 jam17 nad17 pd18 ev18 c...

2 días ago | 0

| accepted

Answered

How to show only elliptic region in color?

try this [X,Y] = meshgrid( -10:0.2:10 ); Z = X.^2 + Y.^2; ind = X.^2/5^2 + Y.^2/3^2 < 1; Z(~ind) = nan; pcolor(X,Y,Z)

How to show only elliptic region in color?

try this [X,Y] = meshgrid( -10:0.2:10 ); Z = X.^2 + Y.^2; ind = X.^2/5^2 + Y.^2/3^2 < 1; Z(~ind) = nan; pcolor(X,Y,Z)

2 días ago | 0

Answered

How to shade area under 2D- curve into a certain x values

Maybe something is wrong with importing? Try importdata Data = importdata('cl024_12._lab.txt'); L = Data.data(:,5); Depth = D...

How to shade area under 2D- curve into a certain x values

Maybe something is wrong with importing? Try importdata Data = importdata('cl024_12._lab.txt'); L = Data.data(:,5); Depth = D...

2 días ago | 0

| accepted

Answered

How to plot the 3D spherical histogram?

You can create it manually clc,clear v = rand(10,3)*2-1; v0 = v(:,1)*0; quiver3(v0,v0,v0,v(:,1),v(:,2),v(:,3),1) axis equ...

How to plot the 3D spherical histogram?

You can create it manually clc,clear v = rand(10,3)*2-1; v0 = v(:,1)*0; quiver3(v0,v0,v0,v(:,1),v(:,2),v(:,3),1) axis equ...

2 días ago | 0

Answered

Rotate 3D surface matrices

You can manually change data. Just use rotation matrix a = 15; % angle rotation R = [cosd(a) sind(a);-sind(a) cosd(a)]; V...

Rotate 3D surface matrices

You can manually change data. Just use rotation matrix a = 15; % angle rotation R = [cosd(a) sind(a);-sind(a) cosd(a)]; V...

2 días ago | 0

| accepted

Answered

saving points in a sequence to form a contour

I made some research and succeeded. See attached script

saving points in a sequence to form a contour

I made some research and succeeded. See attached script

3 días ago | 0

| accepted

Answered

ploting data excel to matlab

I corrected your script. Try now [filename,path] = uigetfile('.xlsx') dataExcel = xlsread(fullfile(path,filename)) penghasi...

ploting data excel to matlab

I corrected your script. Try now [filename,path] = uigetfile('.xlsx') dataExcel = xlsread(fullfile(path,filename)) penghasi...

3 días ago | 0

Answered

How do I plot animation of temperature data for a 3D object with time?

Just use pause and for loop maxt = max(t); mint = min(t); N = 100; cmap = jet(N); % generate N colors for tem...

How do I plot animation of temperature data for a 3D object with time?

Just use pause and for loop maxt = max(t); mint = min(t); N = 100; cmap = jet(N); % generate N colors for tem...

4 días ago | 0

Answered

CAN SOMEONE HELP ME WITH THE PLOT?

My solution x = 1 : 12; y = x; ind = [1 2 4 6 7 8 11]; plot(x,y,'.r') hold on for i = 1:length(ind)-1 x1 = x(ind(i));...

CAN SOMEONE HELP ME WITH THE PLOT?

My solution x = 1 : 12; y = x; ind = [1 2 4 6 7 8 11]; plot(x,y,'.r') hold on for i = 1:length(ind)-1 x1 = x(ind(i));...

4 días ago | 0

Answered

Filling areas between curves

Example clc,clear x1 = linspace(0,1.5); y1 = sin(x1); x2 = linspace(0,2); y2 = cos(x1); cla [xc,yc] = polyxpoly(x1,y1,x...

Filling areas between curves

Example clc,clear x1 = linspace(0,1.5); y1 = sin(x1); x2 = linspace(0,2); y2 = cos(x1); cla [xc,yc] = polyxpoly(x1,y1,x...

4 días ago | 0

Answered

For loop over different dimensions

What about filling with NaN? y = portfolios(:,i); % Between 60 and 180 observation if length(portfolios(:,i)) < 180 y...

For loop over different dimensions

What about filling with NaN? y = portfolios(:,i); % Between 60 and 180 observation if length(portfolios(:,i)) < 180 y...

4 días ago | 0

| accepted

Answered

Draw this type of figure from given data.the data contains lat long disp(north,east,down) and other quantities but i need figure only for the displacement simillar to the attached figure

Here is what i tried. I didn't use disp_down, only east and north A = xlsread('coseis.xlsx'); x = A(:,1); y = A(:,2); u = ...

Draw this type of figure from given data.the data contains lat long disp(north,east,down) and other quantities but i need figure only for the displacement simillar to the attached figure

Here is what i tried. I didn't use disp_down, only east and north A = xlsread('coseis.xlsx'); x = A(:,1); y = A(:,2); u = ...

4 días ago | 0

Answered

For Loop nested within a while loop, run until condition is met

This lines actually means: "loop if condition is met" while headold-head<cc % solving for head until convergence criteria is me...

For Loop nested within a while loop, run until condition is met

This lines actually means: "loop if condition is met" while headold-head<cc % solving for head until convergence criteria is me...

4 días ago | 0

| accepted

Answered

how can i make matlab select a value for a vector variable from a set of data

Use xlsread MCRdata = xlsread('data.xls'); % read data from excel file MCR0 = MCRdata(5); % assign 5th v...

how can i make matlab select a value for a vector variable from a set of data

Use xlsread MCRdata = xlsread('data.xls'); % read data from excel file MCR0 = MCRdata(5); % assign 5th v...

4 días ago | 0

| accepted