Answered
Unrecognized function or variable 'arma'
Given the syntax used, arma is a function, but it is not an inbuilt function. Do you have a function defined as arma? If yes, i...

3 years ago | 0

| accepted

Answered
I am having problem with chapter 15(15.2) Vectorizing the Comparison Function in Matlab fundamentals course.
You are currently on the isequaltol_vec.mlx page. You need to go to the comparewithtol.mlx script page and write the code there...

3 years ago | 2

Answered
How to create string of text-objects
Given the format of your final output, you will either have to use string arrays, cell arrays or categorical arrays. %Categoric...

3 years ago | 1

Answered
Multiple integrals with 2 definite integral and 2 symbolic result, how can I get it?
The sytanx you used was incorrect, the correct syntax is - int(Integrand, Integration Variable, Limits of Integration) syms a b...

3 years ago | 1

| accepted

Answered
How to access data of regexp output (without temporary variable)?
Experimenting lead to this - str = ["apple 001"; "banana 102 3579"; "orange 344 001"] C = array2table([extractBefore(str,' ') ...

3 years ago | 1

Answered
How to combine 2 single column variables in to 1 double column variable and output it to a csv or txt file with a header for each column?
var1 = rand(262144,1); var2 = rand(262144,1); T = table(var1,var2,'VariableNames',{'header1', 'header2'}); writetable(T,'file...

3 years ago | 1

| accepted

Answered
Using a range as an input value in symbolic equations
You get the error because A is 1x2 and x is 1x1 and you can not multiply 1x2 to 1x1. Now you would think of changing the order, ...

3 years ago | 0

| accepted

Answered
Computing the Standard Deviation of Values in a column in Matlab
out = std(tablename.Speed(1:15))

3 years ago | 0

| accepted

Solved


Generate a Parasitic Number
This problem is the next step up from Problem 156. Rather than determining if an input is a parasitic number, you will be asked ...

3 years ago

Answered
How to create array while using integral function?
%Formatting your code properly is a good coding practice K1=6; %(W/m.K)Thermal conductivity of Fe3O4 nanopa...

3 years ago | 0

Answered
Rainfall Accumulation Event Based
%Added values at end points y = [-6 -8 -10 0 1 1 2 0 0 0 0 2 4 5 2 0 0 3 5 7]; for k=2:numel(y) if y(k-1) && y(k) ...

3 years ago | 0

| accepted

Answered
Question about aligning x-axes in subplots on the same row in Matlab
One way to achieve this is to modify y-limits. figure x = linspace(0,10,1e3); subplot(2,2,1) y1 = sin(x); plot(x,y1) y...

3 years ago | 0

Answered
Live script plots not showing or overwriting
clc; clear all; close all; This is the root of your problem, this line clears all the data, variables, plots etc (basically any...

3 years ago | 0

| accepted

Answered
Function to find vertex of graph?
m = 2.5; % kg k = 6e6; % N/m c = 180; % N-s/m r = 0:0.01:2; Wn = sqrt(k/m); % rad/s zeta = c / (2*sqrt(k*m)); ...

3 years ago | 0

| accepted

Answered
How to stop pi appearing as a text in the disp result?
Convert the symbolic value to floating point value - format long syms x f = cos(x); t6 = taylor(f,x); val = double(subs(t6,...

3 years ago | 0

| accepted

Answered
How to do moving average for x and y data points in a scatter plot?
It's not clear to me what exactly do you want to achieve. You say 10 points, but you use N=8. "I want to see how moving avera...

3 years ago | 0

| accepted

Answered
Inconsistency results of the same calculation in two seperate files
Theoretically, the equation eqn1 doesn't make sense, as it simplifies to Voc/Rsh == 0, which does not have a solution. syms n k...

3 years ago | 0

| accepted

Answered
I am getting "Conversion to logical from table is not possible." error, how do you solve it?
The input data to writetable() is supposed to be a table, which is not in this case. Use readmatrix and writematrix instead. An...

3 years ago | 0

Answered
How can I make a loop for solving a quadratic equation with 200 different data points and only include the positive values of the quadratic eqaution?
"eqn" is a quadratic equation in x and thus using solve() will give you 2 outputs. But you are trying to assign 2 outputs to one...

3 years ago | 0

Answered
How to solve equations in variable terms?
syms a b c d e f g h alpha A = [a b; c d]; R = [cos(alpha) -sin(alpha); sin(alpha) cos(alpha)]; D = (R*A)*transpose(R); ...

3 years ago | 0

| accepted

Answered
error in ode45. I have declared the vector to be 3x1 but it only reads it as 2x1.
You get the error because dpdt is empty, and thus dydt is 2x1. Instead of defining kpm as global, it is better to define it as...

3 years ago | 0

| accepted

Answered
How to generate the following Graph in MATLAB ?
Use the function distances to find the shortest distance for all pairs of nodes sr = [1,2,2,2,3,3,3,4,5]; ta = [2,3,6,8,6,4,7,...

3 years ago | 0

| accepted

Solved


Sequence Vectorization - II
This is the second part to the question - Sequence Vectorization - I Given an array of Natural numbers, N, return the sequence ...

3 years ago

Answered
Finding an index from a 3D matrix
sub2ind works for 3D arrays as well %Initial array, with random values for example in = reshape(1:105,3,5,7); %Array reshaped...

3 years ago | 0

| accepted

Answered
Avoid multiple output using fprintf of multiple variables in livescript
k=[3.96306869127352e-05; 1.33047441644794e-05; 3.37761112449900e-05; 7.19380417629400e-06]; confk=[2.956226131044...

3 years ago | 1

| accepted

Answered
Want to insert a matrix in a for loop and change it with a variable
d1 = 0.1077; lam = 3:0.1:7; th = 0; n1 = 2.32; %Define phi1 outside the loop as it is not varying with the loop phi1 = 2*...

3 years ago | 0

| accepted

Answered
How do I display only certain numbers from a plot?
"&&" can only be used when then result of each logical expression is a scalar (as the error states as well), in all other cases ...

3 years ago | 0

Answered
Insert symbolic equation in another symbolic equation
Use vpa to get numerical values. Convert them to double() if you need the values to be in numeric data type. syms z %first roo...

3 years ago | 0

| accepted

Solved


Easy Sequences 110: Integration of the Sum of a Recursive Trigonometric Function
A trigonometric function, , is defined as follows: , in radians Applying recursively we define another funct...

3 years ago

Answered
Solving Integral in matlab
There are cases when int is unable to compute the value of definite integral. In such cases, use vpa to obtain the approximate n...

3 years ago | 0

Load more