Beantwortet
I want to insert a matrix into RowNames that exist in a table.
h=[2,4,6,8,10,12,14,20,30,50,100,1000]'; t=[2,4,6,8,10,12,14,16,18,20]; u=h*t; q=strcat("T=",string(t'))'; p=strcat("h=",s...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
I want to send output values from MATLAB to an Excel file
FreqFinal = mean(freq) PeriodFinal = mean(period) error = midline-t amplitudeFinal= mean(max(y)-midline) Data_export = [Fr...

mehr als 3 Jahre vor | 0

| akzeptiert

Frage


How can i use intersect function correctly ?
I tried the following code to use intersect function available in Matlab f=@(x)1+cos(x); g=@(x)sin(x); x=-8:.01:8; A = inter...

mehr als 3 Jahre vor | 2 Antworten | 0

2

Antworten

Beantwortet
Using While Loop For Grouping Pie chart "Slices"
x= [0.66,0.38,0.01,0.01,0.13,0.01,1.38,3.96,1.04,0.01,0.39,0.38,0.36,0.32,2.61,2.73,0.01,0.95,1.94,0.01,0.01,1.18,1.42,0.01,0.37...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Adding prefix to indexe
SourcePath ='/subf1/subf2/subf3/subf4/subf5/subf6/'; index = 1001 : 1002; %iteration for the 7th subfolder for i = 1 :...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Why do I receive 'Error using sym>tomupad' in Line 6 when plotting impulse signal with right time shifting?
%create symbolic functions x, a, b, c, d, e, f_c with independent variable t syms x(t) a(t) h(t) b(t) c(t) d(t) e(t) f_c(t) x(...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Contour not being rendered for non-finite data??
%crack length - for Kanalytical a = 0.1; K = sqrt(pi*a)*1000; %grid for results to look like plate, adjusting for crack edg...

mehr als 3 Jahre vor | 0

Beantwortet
Physics costing electricity, KW/KWh
% assume P_rating = 2e3; % 2000 W = 2kW number_units = 50/7.5 % since each unit is treated as 1kWh @ 7.5p per unit run_time...

mehr als 3 Jahre vor | 0

Beantwortet
Adding multiple cylinders into the same model PDE Toolbox
model.Geometry = [SC3d VS3d]

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do I exit a for loop after logical index is found true in an array?
use inside the if-end statement % check if trajectory goes through the zone result = false; for i = 1:length(xNormalized) ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to parameterize function.
syms x y z P = [x^2 +2*y +3*z; x*y -2*z^2] subs(P,{x,y,z},{t,t,t})

mehr als 3 Jahre vor | 1

Beantwortet
"Matrix dimensions must agree" when trying to plot the sum of a sin function
s2 = sin((2*m-1)*x)./(2*m-1); Use element wise division

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To perform elementwise matrix powers, use '.^'.
The element wise power for a scalar should not affect much on your calculation unless vectors are multiplied or raised to power ...

mehr als 3 Jahre vor | 0

Beantwortet
Z must be a matrix, not a scalar or vector.
t=0:30 % a vector x=(1+0.25.*cosd(45.*t)).*cosd(t); y=(1+0.25.*cosd(45.*t)).*sind(t); [X,Y] = meshgrid(x,y) % X and Y matr...

mehr als 3 Jahre vor | 0

Beantwortet
Could anyone tell me why I am getting an error with "else" in my code. This is my first time using this software and I am very confused.
This is standard syntax for if-else statements in matlab if condtion ... elseif condition ... else ... end

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
error: Index in position 2 exceeds array bounds (must not exceed 31).
clear all clc %Geometry definition L=0.3; %Length of the The rectangular bar in meter W=0.4; ...

mehr als 3 Jahre vor | 0

Beantwortet
Is there a way of getting displayFormula to print multiplication (×) symbols in an equation?
syms a b strEquation = "a*b"; disp(strEquation)

mehr als 3 Jahre vor | 0

Beantwortet
Hello all please help me to plot this function
The conditions seem wierd, considering random number series .as inputs m=4 syms i; % t = 50; for t=2:50 x(t)=randi([0...

mehr als 3 Jahre vor | 0

Beantwortet
My code is giving me a straight line for values of N other than 5
clear variables close all M = 250; % The length of each function t = -5:0.1:5; y = zeros(1,M); % Initiallize the sum to zero...

mehr als 3 Jahre vor | 0

Beantwortet
For loop not stopping
if ismember(-9999,aspect(i,1)) Check using ismember

mehr als 3 Jahre vor | 0

Beantwortet
Bar graphs don't group bars if there is only one group in the data
like this ? % Artificial data: Two vertical vectors of height 3 x=reshape(randperm(6),3,2) % Correct grouping into pairs s...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Using listdlg along with case statement
A = [15 22 25 17 7 3 2 2]; B = [17 23 27 15 5 2 1 1]; % ---^^^^^^^^ these values in B are higher compared to A length(B) le...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Change plot scale y axis
u21=[224 224 224 223 218 218 217]; beta1=[0 0.19 0.26 0.38 0.76 0.83 0.9]; plot(beta1,u21,'-*'); xlabel('beta') ylabel('U[V]...

mehr als 3 Jahre vor | 1

Beantwortet
Bar graphs don't group bars if there is only one group in the data
% Artificial data: Two vertical vectors of height 3 x=reshape(randperm(6),3,2) % Correct grouping into pairs subplot(1,2,1)...

mehr als 3 Jahre vor | 0

Beantwortet
Taking derivative and putting it equal to 0 to find theta.
syms x s h S = (6*s*h) - ((3*s*s*cot(x))/2) + ((3*s*s*sqrt(3)*csc(x))/2) Y = diff(S,x) == 0 % take derivative of equation w....

mehr als 3 Jahre vor | 0

Beantwortet
I want help solving differential equations
syms x y(x) eqn = diff(y(x),x)+sqrt((1-y^2)/(1-x^2))==0 cond = [y(0) == 1;y(1) == 0] % check with some other initial conditio...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how to replace/import .mat file with parameter values?
A = load(websave('X','https://in.mathworks.com/matlabcentral/answers/uploaded_files/1213353/torque_for_Sid.mat')) speed = 1000/...

mehr als 3 Jahre vor | 0

Beantwortet
fprintf results into 2 columns
clc; clear; close all; principal = 1000;%input('Enter Principal in Dollars: '); years = 5;%input('Enter Number of years: '); ...

mehr als 3 Jahre vor | 2

| akzeptiert

Beantwortet
copy corresponding values of 2nd metrics depend on 1st metrics values
Z=[]; ii=0 Z2=[]; iii=0; Z3=[]; iiii=0; X = rand(10) Y = rand(10) [RawX, ColX]= size(X) for j=1:RawX; for n=1:ColX...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Create an alternating matrix
maxV = 20; stepS = 5; I = zeros(1,2*(maxV/stepS)+1); I1 = 0:stepS:maxV; I2 = -I1(2:end); I(1:2:end) = I1; I(2:2:end) = I2;...

mehr als 3 Jahre vor | 0

Mehr laden