Beantwortet
Show filtered column of a cell array based on filtered cell header
Hi :D data= {'A' ,'B' ,'C';'1', '2', '3';'1' ,'2', '3';'1', '2', '3'}; fprintf("input with a space \n") %Example: a b or a c...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
solving for an unknown variable when given the rest
syms V y = 0.05; k = 0.0806; v = 90; N = 4; h = solve(y == 1/((1+k*(V/v))^N),V) %multiplication sign missing you only shou...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to use loop to reduce the code?
you can try with cell clc clear syms t sigma r = -4; w = 2; a = 1; b = 1; W = 1; x_2 = 1 A_sin = 1; A_sigma = [0,1;-w...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to eliminate standalone 1 or 0 in binary matrix
You only need a loop and correct conditional statement, the conditional can be: if(A(n) ~= A(n+1) && A(n) ~= A(n-1) && A(n) == ...

mehr als 3 Jahre vor | 0

Beantwortet
How to create hatched fill pattern histograms?
hello. You can try with the function in this url: https://es.mathworks.com/matlabcentral/fileexchange/1736-hatched-fill-patter...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
numerator , denominator, Transfer function,Equation
You just need to enlarge the block

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Calling a user-created function in a different script
You can call a function in your folder for example if your function is: function x = mulx2(y) x = 2*y; end from the main fi...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
why is my vector bigger than how I created
Because the values are saved from space 11 onwards. You must change n+1 in sumvec() n+1 = 11 -- n-9 = 1 sum = 0 sumvec = [] ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Creating a Matrix of random numbers
A long way bits= randi([-1 1],20,20); [r,c,~] = size(bits); count = 1; while count < (r*c)+1 bits = reshape(bits...

mehr als 3 Jahre vor | 0

Beantwortet
Why am I not able to plot the error vs iterations?
You can store the data of (Z-z) in a vector: for ... zz(i) = (Z-z) if abs(zz)<10^(-6) break end end... ...

mehr als 3 Jahre vor | 0

Beantwortet
Bit wise operation of And and XOR together
The binary operation is between two values logics or values of 0's and 1's. In your code some logics operation are done between ...

mehr als 3 Jahre vor | 0

Beantwortet
how to graph using loop?
You must change this: clear all a = 1 vectori = []% ?? areavec = [] figure; for i = 0:20 a = a + a areavec(i+1) ...

mehr als 3 Jahre vor | 0

Beantwortet
create a bar graph
Here there is an example: c = categorical({'Jan ','feb','March '}); y = [2000 3000 4000]; bar(c,y) More info: <https:/...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Comparing elements of two matrices
You should try with loops, conditionals and reshape your matrix . A = [1 2;3 4]; [r,c] = size[A]; A = reshape(A, [1 r*c]) %wi...

mehr als 3 Jahre vor | 0

Beantwortet
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
you should add a parenthesis in V_Ba % Given syms theta; R = 20; L = 80; H = 38; theta_1a = 104.720; % Equation for the v...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Using each value in my array in an equation to see how the "y" value changes with "x"
you should change this y=(4560*2)./((pi*2)*(16-x.^2)) % / --> ./

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to pick out single occurring elements of an array
you can try with a conditional and counter: count = 0; l = 1; for n=1:length(A) for m = 1:length(A) if(A(n) == ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to insert the coding of t^2 power in MATLAB command window
t^2 %for scalar %Example: t = 2; t^2; ans = 4 t.^2 %for matrix %Example: t = [1:12]; t.^2; ans = 1 4 ...

mehr als 3 Jahre vor | 0

Beantwortet
How to vectorize if statement
you can try: [aSortV,aSortI] = sort(c,'ascend'); f = 0; if(m < 7 && m < sm*0.3) f = aSortI(1); end

mehr als 3 Jahre vor | 0

Beantwortet
Consecutive count of values based on multiple conditions
you should try with a series of if..else. For example: for i = length(output) if(pbehind(i) > 1.5 && pbehind(i-1) == 0) o...

mehr als 3 Jahre vor | 0

Beantwortet
Cell array Numeric data splitting
I think you don't need to use "cell" for C {j}, however you can use "cell" for V {j}. something like that: clearvars; clc; N...

mehr als 3 Jahre vor | 0

Gesendet


Continuous Piecewise Function (Linear) (FunciĆ³n por partes)
With this function you can generate a Piecewise linear graph only with the points that unit the functions.

mehr als 3 Jahre vor | 2 Downloads |

Thumbnail

Beantwortet
how to read the certain row and column from the cell array?
Example: x = [2 3 3 4 45] x(1:3) ans = 2 3 3 y = [8 90 79 23 4 34] y(4:6) ans = 23 ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to insert numbers into a empty vector in a loop
You can try: function [x0ut,count] = sqra(mIn,sIn) while counter=counter+1; count(counter)=counter; x(...

mehr als 3 Jahre vor | 0

Beantwortet
delete zero elements from vector
You can use: k(k==0) = []; k(length(k)+1:length(k)+2) = k(1,length(k));

mehr als 3 Jahre vor | 1

Beantwortet
If Statement to identify integer
N is your number. if(mod(N,1) == 0) fprintf("i% is a integer \n", N); else N = ceil(N) end

mehr als 3 Jahre vor | 0

Beantwortet
How to plot f: y=e^-x.sin^2x function in matlab?
You should try this x = 0:1e-3:10 y=exp(-x).*sin(x).^2; plot(x,y)

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how can i remove a part from stairs graph ?
With the xlim() and ylim() command you can see from 2.7 to 6 a=[0;1; 2; 3]; b=[0;2.7;5.2;4.5]; figure stairs(b, a, 'LineWidt...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
why wont my code show my line in the plot?
you should change the last line r=1.1;c=1.2;po=80.;qo=700.; rqo=r*qo;rc=r*c; t1=linspace(0.,0.2,10); t2=linspace(0.2,0.8,10)...

mehr als 3 Jahre vor | 0

Beantwortet
From which elementary functions does the waveforms consists of and compose them in the variable final
You can try use equation of a line: m = ((y2-y1)/(x2-x1)); y = m*(x-x1))+y1); %x Can be your "t" and build the signal by sect...

mehr als 3 Jahre vor | 0

Mehr laden