Gelöst


Continuous NaNs - I
Remove any continuous NaNs that appear in the array - %Example 1 input = [1 NaN 2 NaN NaN 3 NaN NaN NaN] output = [1 NaN 2 ...

etwa 3 Jahre vor

Beantwortet
I'm trying to write 5 for loop cycles with a step
Vectorization ftw! %Define variables b = [0:0.4:2]; errore = [0.4:0.3:1.5]; %To obtain the combination according to the co...

etwa 3 Jahre vor | 0

Beantwortet
i have an error when i draw a polar The error is
Use readmatrix to directly load the data into a numeric array. importdata loads the data into a structure array for the given ...

etwa 3 Jahre vor | 0

Beantwortet
Problem with variable 'nanmean'.
nanmean is a part of the "Statistics and Machine Learning Toolbox", which I believe you do not have and which is why you get the...

etwa 3 Jahre vor | 0

Problem


Continuous NaNs - I
Remove any continuous NaNs that appear in the array - %Example 1 input = [1 NaN 2 NaN NaN 3 NaN NaN NaN] output = [1 NaN 2 ...

etwa 3 Jahre vor | 1 | 11 Lösungsvorschläge

Beantwortet
I need to create a loop to evaluate a function at decreasing points.
You can use a for loop to do that, evaluate the function at each point and store the result. Another way is vectorize the opera...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Deleting elements of an array with consecutively occurring NaN values
Note that this removes any NaN groups occuring at the start or at the end of the data. %Modified data A = [43 NaN NaN NaN 45 N...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solving equation using 'vpa' function
The equation you have has multiple solutions, see plot below for reference. If you want to return a particular solution, use vp...

etwa 3 Jahre vor | 0

Beantwortet
solve the equation for one variable and find the value of variable
"out come is shows only a constant valu s=1 for all value of p kindly check this error" That's not an error. a==1 is a solut...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to repeat a vector number of times with a certain value added to each row
vec = 1:5; rep = 3; val = 4; out = vec + val*(0:rep-1)'

etwa 3 Jahre vor | 0

Beantwortet
Creating vectors from columns of a matrix
You can not obtain the output you want in terms of numeric data type due to size mismatch for vertical concatenation. You can ob...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to randomly extract 10 elements from that matrix
A = rand(1000,1); %10 random indices less than or equal to the number of elements in A idx = randperm(numel(A),10) out = A(id...

etwa 3 Jahre vor | 0

Beantwortet
how to calculate mean of interrupted data
A=1:20; A([2 4 8 16]) = NaN; disp(A) idx = [0 find(isnan(A)) numel(A)+1] for k = 1:numel(idx)-1 %Range of indices betwe...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How can I align a sequence of three data points?
data_A = [0 4 5 7 8 9]; data_B = [4 5 7 8 1 5 6]; data_C = [2 5 3 4 5 7 8]; Note that this is not the best method to obtain ...

etwa 3 Jahre vor | 1

Beantwortet
whats wrong with this code? Im trying to find the first 50 primes in a sequence, and then sort it into a 5x10 array
Firstly, do not use built-in functions as variables names, primes in this case. Secondly, all the functions in a script must be...

etwa 3 Jahre vor | 0

Beantwortet
Code for the curves...
The equation to each curve is given on that particular webpage, you can plot them easily with the numerical fplot or the symboli...

etwa 3 Jahre vor | 1

Beantwortet
How to format notation to use "... x 10^-5..." instead of "...e..." in this figure
%Random graph syms x fplot(jacobiP(1:4,4,4,x)) axis([-1 2 -5 5]) grid on %Values to be displayed as the legend arr = ran...

etwa 3 Jahre vor | 1

Beantwortet
If conditions multiple loops
Firstly, if-else condition statements are not loops. Secondly you need to use either "&" or "|" depending upon the how you want...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How can I change my O(n^2) solution to O(n logn) or better?
(Assuming you are working with a vector and finding the first pair whose sum is equal to the target) Use logical indexing in th...

etwa 3 Jahre vor | 0

Beantwortet
How to solve following task?
The values you have add up to 60 and not 65. Total=60; a=28; b=20; c=15; [A,B,C]=meshgrid(0:floor(Total/a), 0:floor(Total...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to plot using peaks function?
You are asked to create a function to evaluate the value at each point pair individually rather than use the peaks() function an...

etwa 3 Jahre vor | 0

Beantwortet
Evaluate an anonymous function for each value in a matrix
"In another implementation like multiplication I would use ".*" to signify elementwise calculations so I am assuming there is so...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
I keep getting error using plot not enough input arguments.
You need to sort your x data. recallv = cell2mat(recall); precisionv = cell2mat(precision); [r,index] = sort(recallv); p = p...

etwa 3 Jahre vor | 0

Beantwortet
Plotting solution curves separately
% Parameters c = 0.0020; a = 0.02; % SIR model (Ordinary Differential Equations) odefcn = @(t,x) [- c*x(1)*x(2); ...

etwa 3 Jahre vor | 0

Gelöst


Find circular arc length, sector area and segment area
Given a circular arc passing through the points P = [ x1 y1 ] and Q = [ x2 y2 ] such that the center angle of the arc (in degree...

etwa 3 Jahre vor

Beantwortet
How to Integrate specific heat equation on matlab?
You need to define a, b, c, d, e, r as well, either as numerical values or as symbolic variables - %Here I have defined a, b, c...

etwa 3 Jahre vor | 0

Beantwortet
Is there a Faster alternative to ismember function ?
Generally, using find() and growing variables in a loop tend to cause the code to be slower. Here you can replace find() with lo...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Evaluating a function using kramers-kronig relation
You can use symbolic integration (Note - Requires Symbolic Toolbox) As you have not provided the value of P, I've defined it as...

etwa 3 Jahre vor | 0

Beantwortet
I am not able to access MATLAB Fundamentals course
The Self-paced Training App services are down currently. You will be able to login and will be able to access your progress once...

etwa 3 Jahre vor | 0

Beantwortet
mustBeInRange with multiple conditions
The function mustBeInRange itself throws an error if the value is not inside the range n_roof = 10; int_H = [10 13 6]; % Case ...

etwa 3 Jahre vor | 0

| akzeptiert

Mehr laden