Answered

Dear all, how can I solve the index exceed the number of array problem?

When the water level time is larger than anything in the array then the next element list would be empty and index 1 of it would...

Dear all, how can I solve the index exceed the number of array problem?

When the water level time is larger than anything in the array then the next element list would be empty and index 1 of it would...

3 days ago | 0

Answered

How to apply function "strrep" to more than 32 substrings?

If you make x a string array with 96 or more elements, then the entire code can be replaced with %{ newIDFFile = regexprep(rea...

How to apply function "strrep" to more than 32 substrings?

If you make x a string array with 96 or more elements, then the entire code can be replaced with %{ newIDFFile = regexprep(rea...

3 days ago | 1

| accepted

Answered

identify time and position when reach terminal velocity

The odeset looks fine for setting the tolerances. Your code should not be using any formula for terminal velocity given forces,...

identify time and position when reach terminal velocity

The odeset looks fine for setting the tolerances. Your code should not be using any formula for terminal velocity given forces,...

3 days ago | 0

| accepted

Answered

Plotting 3D surface for a variable dependent on 2 variables but the 2 variables are not monotically increasing function

N = 100; xvec = linspace(min(FirstIndependent), max(FirstIndependent), N); yvec = linspace(min(SecondIndependent), max(SecondI...

Plotting 3D surface for a variable dependent on 2 variables but the 2 variables are not monotically increasing function

N = 100; xvec = linspace(min(FirstIndependent), max(FirstIndependent), N); yvec = linspace(min(SecondIndependent), max(SecondI...

3 days ago | 0

Answered

Root Finding Newton Method

function [y] = Newton_3397(chuckie,x) syms x You should not be ignoring the input x value. The user is supposed to pass you an...

Root Finding Newton Method

function [y] = Newton_3397(chuckie,x) syms x You should not be ignoring the input x value. The user is supposed to pass you an...

3 days ago | 0

Answered

Why am I getting this error?

By the way: letters = 'AABBCDDEFGHIJKLMNOOPQRRSTUVWXYZ1234456667889990'; if ind > length(letters) letter = '0'; else ...

Why am I getting this error?

By the way: letters = 'AABBCDDEFGHIJKLMNOOPQRRSTUVWXYZ1234456667889990'; if ind > length(letters) letter = '0'; else ...

3 days ago | 0

Answered

MATLAB2020b Parallel Computing Number of Workers

Hyperthreading does not provide additional computation capacity. What hyperthreading is, is some extra state registers that per...

MATLAB2020b Parallel Computing Number of Workers

Hyperthreading does not provide additional computation capacity. What hyperthreading is, is some extra state registers that per...

3 days ago | 1

Answered

Read and writing matrices; need to keep column labels??

% load data set in via user: prompt = 'please enter file: '; filename = input(prompt, 's'); eeg = readtable(filename); [r,...

Read and writing matrices; need to keep column labels??

% load data set in via user: prompt = 'please enter file: '; filename = input(prompt, 's'); eeg = readtable(filename); [r,...

3 days ago | 0

Answered

How to access data in structures?

fieldnames = fieldnames(structure) fieldInedd = fieldnames{2} informationfromthisfield = structure.(fieldIneed) Notice the ()...

How to access data in structures?

fieldnames = fieldnames(structure) fieldInedd = fieldnames{2} informationfromthisfield = structure.(fieldIneed) Notice the ()...

3 days ago | 0

| accepted

Answered

Audio compression using DCT

M=round(y/framesize); You have a problem there. You use M as a size in the code, but you calculate it based upon the content of...

Audio compression using DCT

M=round(y/framesize); You have a problem there. You use M as a size in the code, but you calculate it based upon the content of...

4 days ago | 2

| accepted

Answered

Exporting a code from Maple to Matlab

Optimized version of the calculation: t1 = exp(x); t21 = -5 .* t; t3 = exp(t21); t5 = exp((1 + t21)); t4 = ((0 <= t & t <= ...

Exporting a code from Maple to Matlab

Optimized version of the calculation: t1 = exp(x); t21 = -5 .* t; t3 = exp(t21); t5 = exp((1 + t21)); t4 = ((0 <= t & t <= ...

4 days ago | 1

Answered

I need help for simulink build

You need to install QUARC software from the manufacturer of the mobile robot. https://www.quanser.com/products/quarc-real-time-...

I need help for simulink build

You need to install QUARC software from the manufacturer of the mobile robot. https://www.quanser.com/products/quarc-real-time-...

4 days ago | 0

Answered

Simulink Matlab Function Block Error

If you are using 32 bit MATLAB and want to create 32 bit executables, then you can use the lcc32 compiler that is provided with ...

Simulink Matlab Function Block Error

If you are using 32 bit MATLAB and want to create 32 bit executables, then you can use the lcc32 compiler that is provided with ...

4 days ago | 1

Answered

Error in adding 3 sine waves of different frequencies

>> size(S1) ans = 1 100000 >> size(S2) ans = 1 200000 >> size(S3) ans = 1...

Error in adding 3 sine waves of different frequencies

>> size(S1) ans = 1 100000 >> size(S2) ans = 1 200000 >> size(S3) ans = 1...

4 days ago | 0

Answered

Storing a Variable from a While Loop

all_x = cell(20, 1); N = 10; %The starting number of randomly generated integers counter = 0; while N <= 200 %200 is the ...

Storing a Variable from a While Loop

all_x = cell(20, 1); N = 10; %The starting number of randomly generated integers counter = 0; while N <= 200 %200 is the ...

4 days ago | 0

Answered

Can someone help me? I am still new to matlab and can fix the errors that I come across.

I = Ig - Isat.*(exp((V + (I*Rs))/Rp)-1) - (V + (I*Rs))/Rp; %Eq(1) %[...] P = V.*I; V is not defined. I = Ig_Md - Isat_0d.*(e...

Can someone help me? I am still new to matlab and can fix the errors that I come across.

I = Ig - Isat.*(exp((V + (I*Rs))/Rp)-1) - (V + (I*Rs))/Rp; %Eq(1) %[...] P = V.*I; V is not defined. I = Ig_Md - Isat_0d.*(e...

4 days ago | 0

Answered

how to save each loop variable in the same vector?

%data set = x n = 24; M = numel(x)-n+1; all_vi = zeros(1,M); all_fi = zeros(1,M); for i = 1:M xi = x(i:i+23); en...

how to save each loop variable in the same vector?

%data set = x n = 24; M = numel(x)-n+1; all_vi = zeros(1,M); all_fi = zeros(1,M); for i = 1:M xi = x(i:i+23); en...

4 days ago | 0

| accepted

Answered

Mupad partial time derivative

You substitute s for q(t), so B transforms into s*diff(s,t) . s is constant with respect to t so diff(s,t) is 0 and s*0 is 0 (pr...

Mupad partial time derivative

You substitute s for q(t), so B transforms into s*diff(s,t) . s is constant with respect to t so diff(s,t) is 0 and s*0 is 0 (pr...

4 days ago | 1

| accepted

Answered

Not enough memory in editor

Preferences -> General -> Java Heap Memory Can be increased to up to 8 Gigabytes. Note: as of R2020a, the editor will refuse ...

Not enough memory in editor

Preferences -> General -> Java Heap Memory Can be increased to up to 8 Gigabytes. Note: as of R2020a, the editor will refuse ...

4 days ago | 0

Answered

SOS Making a for loop for multiple combinations

G = findgroups(target); rel32 = splitapply(@minus, ori2, ori3) %if there is exactly one match per target rel32 = splitap...

SOS Making a for loop for multiple combinations

G = findgroups(target); rel32 = splitapply(@minus, ori2, ori3) %if there is exactly one match per target rel32 = splitap...

4 days ago | 0

Answered

An Array of Equations to solve for 1 variable

There are two solutions for each I value. L = sym(3); %Wheelbase in meters% w = sym(1.7); %Track in meters% d = sym(0.25); %l...

An Array of Equations to solve for 1 variable

There are two solutions for each I value. L = sym(3); %Wheelbase in meters% w = sym(1.7); %Track in meters% d = sym(0.25); %l...

4 days ago | 0

| accepted

Answered

Error in ODE45 when using ...................... >> [t,x] = ode45(@odefcn,tspan,[0 0]);

[t,x] = ode45(@odefcn,tspan,[0 0]); That is valid syntax. However, your function is relying on the variables a, b, c, and u. M...

Error in ODE45 when using ...................... >> [t,x] = ode45(@odefcn,tspan,[0 0]);

[t,x] = ode45(@odefcn,tspan,[0 0]); That is valid syntax. However, your function is relying on the variables a, b, c, and u. M...

4 days ago | 0

Answered

Symbolic integration of cell arrays

It is not possible to directly perform symbolic integration of cell arrays. You can use the code you posted, or you can use Q ...

Symbolic integration of cell arrays

It is not possible to directly perform symbolic integration of cell arrays. You can use the code you posted, or you can use Q ...

5 days ago | 0

| accepted

Answered

how can i include both linear and logarithmic scales in one plot???

If you just have one line to be plotted and you want one axes to be linear and the other to be log, then you can use semilogx() ...

how can i include both linear and logarithmic scales in one plot???

If you just have one line to be plotted and you want one axes to be linear and the other to be log, then you can use semilogx() ...

5 days ago | 0

Answered

Error using setup: too many input arguments

You have psat installed. You need to find the psat settings.m file (in the main PSAT installation directory) and delete it or re...

Error using setup: too many input arguments

You have psat installed. You need to find the psat settings.m file (in the main PSAT installation directory) and delete it or re...

5 days ago | 0

| accepted

Answered

In-built Audio Files

If you are on Mac or Linux, go into a shell and cd to the installation directory and find . -depth \( -name \*.wav -o -name \*....

In-built Audio Files

If you are on Mac or Linux, go into a shell and cd to the installation directory and find . -depth \( -name \*.wav -o -name \*....

5 days ago | 0

| accepted

Answered

why does Matlab not expand(abs(a-b)^2) ?

>> a=complex(rand,rand) a = 0.0975404049994095 + 0.278498218867048i >> b=complex(rand,rand) b = ...

why does Matlab not expand(abs(a-b)^2) ?

>> a=complex(rand,rand) a = 0.0975404049994095 + 0.278498218867048i >> b=complex(rand,rand) b = ...

5 days ago | 2

| accepted

Answered

Error using / (line 65) Inverse model is noncausal because of delays

g=0.8392/(168.555*s+1)*exp(-28.655*s); Provided that you are trying to construct 0.8392 ------------- 168.555*s + 1 with a ...

Error using / (line 65) Inverse model is noncausal because of delays

g=0.8392/(168.555*s+1)*exp(-28.655*s); Provided that you are trying to construct 0.8392 ------------- 168.555*s + 1 with a ...

6 days ago | 0

| accepted

Answered

How to solve the error: Input arguments must be convertible to floating-point numbers.

syms x y z t w B; Symbolic variables. Ez = Eo*cos(w*t-B*(x+y)); So Ez involves the symbolic variable B E = [Ex, Ey, Ez]; ...

How to solve the error: Input arguments must be convertible to floating-point numbers.

syms x y z t w B; Symbolic variables. Ez = Eo*cos(w*t-B*(x+y)); So Ez involves the symbolic variable B E = [Ex, Ey, Ez]; ...

6 days ago | 2