Beantwortet
Calculate the temperature distr
Without knowing more about the governing equations , its difficult to say about the process involved in your problem definition....

etwa 3 Jahre vor | 0

Beantwortet
Getting error when i use a self define function in a for loop
As the error states, Index exceeds the number of array elements. Index must not exceed 25. the length of InputStr is 25, you ne...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Draw edf plots using "for loop"
"Data" will likely only kept the last record of the signals, which are in the "50 sec", Please look at the below code where w...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to assign different scales between different ticks in axis?
t = linspace(0,10,5); ax = axes; f1 = exp(0.5 * t); f2 = exp(t); plot(ax, t, f1) hold on plot(ax, t, f2) grid on ax....

etwa 3 Jahre vor | 0

Beantwortet
Mesh plot, not able to match size of Z and X
t=0.2; p=1; for kx = -3:.1:3 q=1; for ky = -3:.1:3 energy_ary(p,q)= -2*t*(cos(kx)+cos(ky)); y_ary(q)= ky; q=q+1; end x_...

etwa 3 Jahre vor | 0

Beantwortet
Ode45 calling a matrix and an array in a function
Change this line q = zeros(4,length(ts)); To q = zeros(1,length(ts));

etwa 3 Jahre vor | 0

Beantwortet
readcell error for CSV file in MATLABversion 2022a.
readcell("rte_ioc_map.csv")

etwa 3 Jahre vor | 0

Beantwortet
How to display matrices in cell array in a table?
Hi @JingChong Ning you can use array2table & cell2tmat together to display cell array content present in the table as shown b...

etwa 3 Jahre vor | 0

Beantwortet
Access and extract table array using for loop
tt = edfread('example.edf') tt = timetable2table(tt); tt.Properties.VariableNames = {'Time','ECG','EEG2'}; for k = 1:length(t...

etwa 3 Jahre vor | 0

Beantwortet
fprintf with two variables goes completely through the first variable instead of alternating
x=[1 10 42 6 5 8 78 23 56 45 9 13 23 22 8 9] [xgt10row,xgt10col]=find(x>10) disp('element location of values of...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
The 'diff()' function is running incorrectly in this program (Error using diff Difference order N must be a positive integer scalar)
T_stop=10; T_sample = 0.002; x0 = [0;0;1/2*pi;0]; options=odeset('RelTol',1.0e-6,'AbsTol',1.0e-6,'BDF','on'); [t,x]=ode45(@(...

etwa 3 Jahre vor | 0

Beantwortet
Plotting the graph of (4*x*sinx − 3)/(2 + x^2 )
Use the element wise division for the equation x=linspace(0,4,400); y=((4.*x.*sin(x))-3)./(2+x.^2); %^ ...

etwa 3 Jahre vor | 1

Beantwortet
how would i write script to graph the 't' and 'y' values?
figure; load('ALL_DATA.mat','Box40'); subplot(3,1,1); % use the struct name to access the t & y variables plot(Box40.t,Box4...

etwa 3 Jahre vor | 0

Beantwortet
How to plot data of only specified rows of matrix
The load function imports data to a struct which contains the variables. To access them you need to use a dot operator, Shown ...

etwa 3 Jahre vor | 0

Beantwortet
Unable to exportgraphics or saveas: The value of 'destination' is invalid.
savefig(gcf,'ab.fig') Try using savefig

etwa 3 Jahre vor | 0

Beantwortet
How to improve the calculation accuracy of Matlab?
you can use, smoothdata on the resulting matrix l=4; l1=l;%Tx Mode l2=l;%Rx Mode misalignment = -1:1e-3:1; result = zeros(...

etwa 3 Jahre vor | 0

Beantwortet
im trying to display grade scores and their letter grade.
for i = 1:length(s)

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
who do I keep getting this message? Index in position 1 is invalid. Array indices must be positive integers or logical values.
Moment=zeros(); ki=pi/180; kinc=pi/180; kf=pi; ji=5; jinc=5; jf=100; K = ki:kinc:kf; J = ji:jinc:jf; for k=1:numel...

etwa 3 Jahre vor | 0

Beantwortet
Why find doesn't work?
K=[1 2 3 4 5] K(K>=2.7 & K<3.1) % this works, matlab gives 3 Assignment_L(12,1)=2.7; % this equals 2.7 Assignment_U(12,1)=3...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
make loop if two variable (x and y) present calculate value for (x1 and y1) and store separate name for same formula another calculate for (x2,y2) and store by separate?
x = [1 2 3 4 5]; y= [ 8 3 2 1 6]; % vectorize the equation (easier approach) z = exp(x)+x.*y.^3 +y; % using for loop h...

etwa 3 Jahre vor | 1

Beantwortet
How to insert different size matrices into each row of a zero matrix
syms x [1 10] n = 10; for k = 1:n M(k,1:k) = x(1:k); end M

etwa 3 Jahre vor | 0

Beantwortet
Convert Fahrenheit to Celcius while the inpu Fahrenheit is an array
clear T = 0:10:100; C = (5*(T-32)/9) fprintf('%4.2f F = %4.2f C\n',[T;C])

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to solve the error while solving the given equation by ode45 or ode15s?
As the expression states an extra parenthesis is included in this line dTdt(i,j) = k*(Tin(i,j)-k*T(i,j))+(k4(i,j))*T(i,j+1))-k...

etwa 3 Jahre vor | 0

Beantwortet
Custom Lognormal curve fitting equation using curve fitter in matlab
complete the if-else-end condition using the keywords end , else-if and try, Also in the if condition, there is a missing mul...

etwa 3 Jahre vor | 0

Beantwortet
Wind rose plotting issue
v=[5 15 4; 1 0 0; 13 5 3; 7 0 0; 10 1 2; 11 0 0; 19 2 1; 1 0 0]; %Percentage of winds d=[0 0 0; 45 45 45; 90 90 90; 135 135 1...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Only the last value are being stored in for loop
a(iComb)=ExtSurgeBinEdges_Lo(IndMatFA(iComb,1)); b=[]; % put this line outside of loop b(iComb)=ExtSurgeBinEdges_Md(Ind...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
I cannot detect an error on Newton Method.
function [x,n,error] = NewtonRaphson(f,a,eps_f,eps_x,df,maxits) %>> df % r...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
how to use solve
syms b x a sol=solve ((2*cos(x) - b*(sin(x) + sin(a*x))) == 0,[x a b]) %chooses 'x' as the unknown and returns sol.x sol.a ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
I can't run the code I wrote the way I want. Please help me
%Plot P-V diagram of a given substance using peng robinson equation of state %Substance properties are defined by the peng robi...

etwa 3 Jahre vor | 0

Beantwortet
Array elements are recalculated every iteration
This is one approach, where you can initialize a variable k and iterate along the time step nRows = ceil(endTime / ep.timestep...

etwa 3 Jahre vor | 0

Mehr laden