Answered

Use EV Battery Cooling System

It sounds like the file is not on MATLABs search path. https://www.mathworks.com/help/matlab/matlab_env/what-is-the-matlab-searc...

Use EV Battery Cooling System

It sounds like the file is not on MATLABs search path. https://www.mathworks.com/help/matlab/matlab_env/what-is-the-matlab-searc...

3 years ago | 0

Answered

How do you create a matrix Aij where each value is determined by a formula?

It sounds like a for loop would build your matrix nicely: n = 2000; sz_i = n; sz_j = n; A = zeros(sz_i, sz_j); % Preallocate...

How do you create a matrix Aij where each value is determined by a formula?

It sounds like a for loop would build your matrix nicely: n = 2000; sz_i = n; sz_j = n; A = zeros(sz_i, sz_j); % Preallocate...

3 years ago | 0

Answered

Simulink asynchronous generator voltage input clarification

Hi Abd, For an induction machine to operate, you must be able to generate a rotating field on both the rotor and stator. The fi...

Simulink asynchronous generator voltage input clarification

Hi Abd, For an induction machine to operate, you must be able to generate a rotating field on both the rotor and stator. The fi...

3 years ago | 1

| accepted

Answered

What is the difference between in64, int32, and int8. Are there anymore 'int' functions? (int means integer right?)

Difference between %d, %f, or any other %? These are formatting control codes. %d prints a number in decimal (base 10) format, ...

What is the difference between in64, int32, and int8. Are there anymore 'int' functions? (int means integer right?)

Difference between %d, %f, or any other %? These are formatting control codes. %d prints a number in decimal (base 10) format, ...

3 years ago | 0

| accepted

Answered

How to display a Y value

For interactive use of the graph, consider use of the datatips functionality. In R2018 and above, if you hover your cursor over ...

How to display a Y value

For interactive use of the graph, consider use of the datatips functionality. In R2018 and above, if you hover your cursor over ...

3 years ago | 0

| accepted

Answered

index exceeds matrix dimensions and the toolbox code error

I'd guess that n is larger than the size of P. In the first couple lines it seems that P only gets allocated if the swing angle ...

index exceeds matrix dimensions and the toolbox code error

I'd guess that n is larger than the size of P. In the first couple lines it seems that P only gets allocated if the swing angle ...

3 years ago | 0

Answered

How to apply modifiers to error messages

You've almost got it. The TeX formatting is correct. You need to include the interpreter and modality of the window in a struct ...

How to apply modifiers to error messages

You've almost got it. The TeX formatting is correct. You need to include the interpreter and modality of the window in a struct ...

3 years ago | 1

| accepted

Answered

How to impulse response including unit step function

The Heaviside step function is defined Substitute a logical check on t for u(t). Should be extendable to a shifted step fu...

How to impulse response including unit step function

The Heaviside step function is defined Substitute a logical check on t for u(t). Should be extendable to a shifted step fu...

3 years ago | 0

Answered

How Do I Determine which Group Variables Correspond to the Results of SplitApply

Consider using the second argument output from findgroups? [G,ID] = findgroups(A) also returns the unique values for each group...

How Do I Determine which Group Variables Correspond to the Results of SplitApply

Consider using the second argument output from findgroups? [G,ID] = findgroups(A) also returns the unique values for each group...

3 years ago | 0

| accepted

Answered

Incorporate Incremental Vector into an Equation

Use the elementwise operators (preceed divide/multiply with a dot). https://www.mathworks.com/help/matlab/matlab_prog/array-vs-...

Incorporate Incremental Vector into an Equation

Use the elementwise operators (preceed divide/multiply with a dot). https://www.mathworks.com/help/matlab/matlab_prog/array-vs-...

3 years ago | 0

Answered

count of non zero elements of a row vector in a loop

Try the nnz function. It sounds like you're trying to count the number of nonzero elements in each row? Use arrayfun to apply t...

count of non zero elements of a row vector in a loop

Try the nnz function. It sounds like you're trying to count the number of nonzero elements in each row? Use arrayfun to apply t...

3 years ago | 1

| accepted

Answered

Using CLEAR ALL usually decreases code performance and is often unnecessary

It sounds like you're seeing this in the Editor's Linter coding tips? These are all "clear the slate" commands, Use clc to clea...

Using CLEAR ALL usually decreases code performance and is often unnecessary

It sounds like you're seeing this in the Editor's Linter coding tips? These are all "clear the slate" commands, Use clc to clea...

3 years ago | 1

Answered

Can I use boolean of a variable on a column of another variable

Hi, to confirm/rephrase, you're looking to extract 16 separate arrays, each one corresponding to the case where the response mat...

Can I use boolean of a variable on a column of another variable

Hi, to confirm/rephrase, you're looking to extract 16 separate arrays, each one corresponding to the case where the response mat...

3 years ago | 0

Answered

How To Assign Operator/Variables with a value

I'm not familiar with LGP. Consider a cell array to hold the chromosome? C = {X, 2, @times, 4} Using the operator definition...

How To Assign Operator/Variables with a value

I'm not familiar with LGP. Consider a cell array to hold the chromosome? C = {X, 2, @times, 4} Using the operator definition...

3 years ago | 0

Answered

Creating a vector from recursive elements of another vector

Welcome to MATLAB! Matlab will allocate the memory for you on the fly, so this is a one line operation, no need for a loop :) ...

Creating a vector from recursive elements of another vector

Welcome to MATLAB! Matlab will allocate the memory for you on the fly, so this is a one line operation, no need for a loop :) ...

3 years ago | 0

| accepted

Answered

i need to convert data from hourly data to daily data and plot these data

Import using a timetable. https://www.mathworks.com/help/matlab/timetables.html Decide how you want to decimate the data in col...

i need to convert data from hourly data to daily data and plot these data

Import using a timetable. https://www.mathworks.com/help/matlab/timetables.html Decide how you want to decimate the data in col...

3 years ago | 0

Answered

Passing parameters to dde23 slows it down

Anonymous functions carry some overhead. I wonder if the way it's parsing the arguments to dde23 is causing it to rebuild the an...

Passing parameters to dde23 slows it down

Anonymous functions carry some overhead. I wonder if the way it's parsing the arguments to dde23 is causing it to rebuild the an...

3 years ago | 0

Answered

Concatenate fields of a structure into a matrix

Long-term, it sounds like you might want to consider a different data structure, if that's an option. In the interim, try cell2...

Concatenate fields of a structure into a matrix

Long-term, it sounds like you might want to consider a different data structure, if that's an option. In the interim, try cell2...

3 years ago | 0

Answered

Error in Integrator is not finite. How can I fix it?

Since this happens at t=0, are you possibly dividing the block's input along the way by something that could be zero on simulati...

Error in Integrator is not finite. How can I fix it?

Since this happens at t=0, are you possibly dividing the block's input along the way by something that could be zero on simulati...

3 years ago | 0

Answered

Viewing figure is not possible.

matplotlib takes an explicit "show" command. Try: py.matplotlib.pyplot.show()

Viewing figure is not possible.

matplotlib takes an explicit "show" command. Try: py.matplotlib.pyplot.show()

3 years ago | 1

Answered

Messagebox warning in matlab

The NCC return value you're getting back is a matrix of correlation values (for Lena, it's 512x512). The string you're passing t...

Messagebox warning in matlab

The NCC return value you're getting back is a matrix of correlation values (for Lena, it's 512x512). The string you're passing t...

3 years ago | 0

| accepted

Answered

Printing outputs when running C code in simulink via the coder.ceval function

Not completely sure about this one, but if there is there a way to access the Simulink diagnostics panel from within the C code,...

Printing outputs when running C code in simulink via the coder.ceval function

Not completely sure about this one, but if there is there a way to access the Simulink diagnostics panel from within the C code,...

3 years ago | 1

Answered

save animation ,i need help

Sofiane, Take a look at the VideoWriter and getFrame functions: https://www.mathworks.com/help/matlab/ref/videowriter.html Sp...

save animation ,i need help

Sofiane, Take a look at the VideoWriter and getFrame functions: https://www.mathworks.com/help/matlab/ref/videowriter.html Sp...

3 years ago | 0

Answered

I got this error while running a simulink model

You generally get this error when your simulation has an error that causes one of the states to grow exponentially until one of ...

I got this error while running a simulink model

You generally get this error when your simulation has an error that causes one of the states to grow exponentially until one of ...

3 years ago | 0

Answered

Loading and saving variables when using parallel toolbox

File access with parallel workers can be tricky, and in the past I've been successful by creating a separate temp directory per ...

Loading and saving variables when using parallel toolbox

File access with parallel workers can be tricky, and in the past I've been successful by creating a separate temp directory per ...

4 years ago | 1

| accepted

Answered

How do I highlight very faint lines from an image?

Have you tried the Hough transform? https://www.mathworks.com/help/images/ref/houghlines.html

How do I highlight very faint lines from an image?

Have you tried the Hough transform? https://www.mathworks.com/help/images/ref/houghlines.html

4 years ago | 0

Answered

Plot variables with similar names.

Are they already saved variables? If not, can you assign using a cell format instead? The mapping would look something like: v...

Plot variables with similar names.

Are they already saved variables? If not, can you assign using a cell format instead? The mapping would look something like: v...

4 years ago | 0

Answered

Associate Map container with specific values

Map containers are a type of hash object, but not all MATLAB datatypes are hashable. The keys of containers are limited to a sub...

Associate Map container with specific values

Map containers are a type of hash object, but not all MATLAB datatypes are hashable. The keys of containers are limited to a sub...

4 years ago | 0

Answered

How can I plot in dB in Matlab?

Decibels are a ratiometric measurement. For power, as shown in your plot, the reference is 1 milliwatt (denoted from the dBm). 0...

How can I plot in dB in Matlab?

Decibels are a ratiometric measurement. For power, as shown in your plot, the reference is 1 milliwatt (denoted from the dBm). 0...

4 years ago | 0

Answered

Does this variable exist

For structures, use isfield() clear a a.M = 'hat'; isfield(a,'M') % True isfield(a,'N') % False For array size, use length(...

Does this variable exist

For structures, use isfield() clear a a.M = 'hat'; isfield(a,'M') % True isfield(a,'N') % False For array size, use length(...

4 years ago | 0