Respondida
Chain array indexing error to access elements of a function
test = @(t) [t, t^2] % test using t = 10 y = test(10); % define e.g function x = @(t) t.^2+2*t % get the value of funct...

alrededor de 3 años hace | 0

Respondida
"Index in position 2 exceeds array bounds. Index must not exceed 401" Error. Can someone explain to me why here an error appears?
I guess, L may be a vector or array which keeps changing in your program. Try the below x_exact = randn(size(A,1),length(L)+1);...

alrededor de 3 años hace | 1

Respondida
How to create array while using integral function?
K1=6;%(W/m.K)Thermal conductivity of Fe3O4 nanoparticle K2=0.598; %Thermal conductivity of water-https://thermtest.se/thermal-c...

alrededor de 3 años hace | 0

Respondida
How use equation to solve for an array of values
Sig_a= [379 345 276 517 483 414 345 345 310 552 483 414 586 552 483]; Sig_m= [621 621 621 414 414 414 414 414 414 207 207 207 ...

alrededor de 3 años hace | 0

Respondida
Modify an array elements using a for loop
numberSamples = 4; userSamples = [2 12 9 20]; minValue = 10; for k = 1:numberSamples if userSamples(k) < minValue ...

alrededor de 3 años hace | 0

Respondida
Im putting in my equations wrong and i need help
There are several changes needed in your equations, please look at the comments in the code where the changes are necessary T1...

alrededor de 3 años hace | 0

Respondida
Calculate complex integral formula
syms x real n = 0; F = log(x+abs(n))./log(x.^2+n.^2); F3 = vpaintegral(F,x,1,2)

alrededor de 3 años hace | 0

| aceptada

Respondida
Can you change individual elements in a for loop each time?
clc;clear;close all figure hold on col = {'ro','bd','k+'} col1 = {'r-','b-','k-'} % plots points for x=1:3 y=5; plot(x,...

alrededor de 3 años hace | 0

| aceptada

Respondida
display a MATLAB table in a figure
fig = uifigure(); Use *uifigure*

alrededor de 3 años hace | 0

| aceptada

Respondida
Adding to existing date value
d = datetime(2023,3,27, 'Format','u-MM-dd') d = datetime(addtodate(datenum(d),5,"day"),'ConvertFrom','datenum','Format','u-MM-d...

alrededor de 3 años hace | 0

Respondida
Unable to get the correct 3-D Helix plot using the parameters
% Define the parameters p = 0.199; % Pitch distance a = 0.02999500; % Radius of the helix wire b = 0.191; % Radius of the ...

alrededor de 3 años hace | 0

| aceptada

Respondida
WHAT would be the reason this matlab code works but does not draw the graphic?
The y0 and v0 values are both zero and that results in infinite value, which cannot be plotted. Give suitable values to both v...

alrededor de 3 años hace | 0

Respondida
Error in ode45
As error suggests that inputs must be of type 'double' , there is a symbolic variable declaration for variable t_o inside th...

alrededor de 3 años hace | 0

| aceptada

Respondida
Loading .mat file problem
Assign the data to a variable e.g. Data or Data1, Data2 ... if there are more than one file, and access the data using a dot o...

alrededor de 3 años hace | 0

| aceptada

Respondida
Why are my line plots are coming out improperly?
h4 and h8 line plots contain 2D matrices clc;clear;close all; %for head on collision L= 4; D= 3.860; lam= 0.397; % lamda...

alrededor de 3 años hace | 0

Respondida
Fourier Series Integration in terms of Pi
Hi @Bob Gill, the value of bn can be computed as follows syms t n 'integer' an = (1/pi)*(int(-1*cos(n*pi*t/pi),-pi,-pi/2)+int...

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

| aceptada

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

alrededor de 3 años hace | 0

| aceptada

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

| aceptada

Respondida
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(@(...

alrededor de 3 años hace | 0

Respondida
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); %^ ...

alrededor de 3 años hace | 1

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

Cargar más