Réponse apportée
plotting y-axis issue and wrong plot
subplot(3,1,3) hold on for m=linspace(0,1000,11) a=linspace(20,220,1000); M=linspace(0,1000,1000); f=M.*a;. %...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Combining columns in a table into comma separated values while skipping NaN
currTable{jj} = strcat(num2str(currTable.Var3(jj)),',',num2str(currTable.Var4(jj))); If you use cell arrays it becomes easi...

plus de 3 ans il y a | 0

Réponse apportée
problem with Read excel file
You can try using a *readmatrix* function. <https://in.mathworks.com/help/matlab/ref/readmatrix.html>

plus de 3 ans il y a | 0

Réponse apportée
Implementing a markov chain for a probability dependent random walk
for n = 1-n0 :2: n0-1

plus de 3 ans il y a | 0

Réponse apportée
Store a values in to a table at each iteration of loop
clear all close all v1=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]; Fs=12000; %sampling frequency T=1/Fs; %samplin...

plus de 3 ans il y a | 0

Réponse apportée
Can anyone explain why I'm getting this error?
omega=3*pi/2 There is missing multiplication operator

plus de 3 ans il y a | 0

Réponse apportée
Plot two sets of data in one plot (different Time vs Temp data sets)
% figure('WindowState','maximized'); x1 = 1:10; A1 = rand(10,1); x2 = 1:10; A4 = rand(10,1); plot(x1, A1, 'LineWidth', 1)...

plus de 3 ans il y a | 0

Réponse apportée
how to plot the exponential fourier series in matlab?
% (a)plot x(t) over a time interval (0,3) clear;clc t = 0:0.01:3; % total simulation time x = exp(-t); plot(t,x,'r','LineWid...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to shift collum of matrix to the right ?
A = eye(10) A = circshift(A(3,:),1) You can use circshift function to shift position of zeros in the matrix as above

plus de 3 ans il y a | 0

Réponse apportée
How to use for loop to count?
patient_ages = [15 8 6 12 16 3 18 12 13 9 8 15 5 2] over12 = 0 for i=1:length(patient_ages) if patient_ages(i) > 12 ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Calculating Value of Inverse function
syms x g = finverse(x.^2./(1+sqrt(x)),x); % x = 2; f = @(x) g; disp(f(2))

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to set x axis limit while using semilogx
T1 = [1 10 100 1000 10000] % x values T2 = [0.1 10 100 1000 10000] % x values Y = [0 1 4 7 10] semilogx(T1, Y,T2, Y) axis([0...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
trying to convert the answers for T2 into an array for min and max values
betad = 0:30:180; betar = deg2rad(betad); T2array = zeros(2,numel(betar)); for k = 1 : length(betar) Beta = betar(k); ...

plus de 3 ans il y a | 0

Réponse apportée
I am trying to plot this problem but can not get the exact result.whats wrong with this.
E=100*cos(3*1e8*t+k_y*y+k_z*z) % 1e8 plot(y,E,'linewidth', 2);grid on;

plus de 3 ans il y a | 0

Réponse apportée
how do I store the values of the equation from a for loop in a matrix, each run being the following row?
y = 0; n = 1; imax = 9; a = zeros(imax,1000); a(1,:) = y; x = linspace(0,2,1000); for i=1:imax y = y + (1/n * sin(n*2...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How can you extend a vector with the last value?
X = rand(1,5) A = rand(1,3) Anew = [A repmat(A(end),1,size(X,2)-size(A,2))]

plus de 3 ans il y a | 0

Réponse apportée
Using a while loop to solve a Taylor Series with approximate values.
f = atan(1); n = 0; i = -1; err_approx = 100; while (err_approx >= .5) % check the condition here i = i + 2; ...

plus de 3 ans il y a | 0

Réponse apportée
Torque of a turbine using Euler's equation
clc; clear all; % T = pQ(r1V1cosa1 - r2V2cosa2) % Alpha is the angle between turbine linear % velocity and absolute p = 1.9...

plus de 3 ans il y a | 0

Réponse apportée
linspace is causing an error
n2 = [1.2 1.75 2.2]; D = linspace(0,1,100); for k = 1:length(D) T(:,k)= (9.68.*n2.^2)./(11.6964.*n2.^2)+(1-n2.^2).*(5.8564-n2...

plus de 3 ans il y a | 1

Réponse apportée
How to setting one horizontal axis for 2 subplot?
subplot(3, 1, 1:2); plot(rand(10, 1), 'b.-', 'LineWidth', 2); xticks(1:10) grid on; xticklabels({}) subplot(3, 1, 3); plot...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How do I solve this please? Write a function called 'corners' that takes a matrix as an input argument and returns four outputs
C = randi([2 10],4) % give this as input in >> command window [top_left, top_right, bottom_left, bottom_right] = corners(C) ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to create a plot for multiple CSV files in a loop?
textscan(fid,'Delimiter',',','Headerlines',12)

plus de 3 ans il y a | 0

Réponse apportée
I do not understand why this script {8/2<5*3+1>9} with logical operators gives NO (0)?
Matlab evaluates the expression from left to right, If you start with numbers from left to right in your expression, it will fir...

plus de 3 ans il y a | 2

Réponse apportée
How to input new value as old value using while loop to compute relative error?
r_e = abs((p-p_old)/(p));

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Insert a figure in a report on Web Apps
add(rpt,figure(f1)) Pass the function handle for figure with smallcase

plus de 3 ans il y a | 0

Réponse apportée
How can I plot the fourier series of a rectangular pulse by calculating the coefficients?
close all; clear; clc; N = 2; f = @(x) rectangularPulse(-1,1,x); x = -2:0.001:2; %2*p is the period p = pi; % the main fun...

plus de 3 ans il y a | 0

Réponse apportée
Solving an equation with multiple values
f1 = ((2*69*0.3)./(pi*a))*0.5;

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Loop for end before it should
f = 1 g = 2 for i = 1:(length(nb)) %length(nb) represent the number of items selected in the first listbox myExcel = actxserv...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Can Someone help me solve what is wrong with this code
%syms CP Comment this line and try as CP is symbolic. Then you get know whether it's maximum or minimum

plus de 3 ans il y a | 0

Réponse apportée
How to replace values of a variable in a table (in a cell) with nan?
mycell{5, 1}(1,1).myvariable = nan;

plus de 3 ans il y a | 0

| A accepté

Charger plus