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...

alrededor de 17 horas ago | 0

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,...

1 día ago | 0

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...

1 día 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 ...

2 días 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 ...

24 días 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

24 días 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...

24 días 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...

24 días 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...

24 días 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(...

25 días ago | 0

Answered

Making the if statement in a for loop display only one iteration of the message

Looks like it takes 25 iterations to converge. Are you looking for it to display at the very end a Success/Failure message? The...

Making the if statement in a for loop display only one iteration of the message

Looks like it takes 25 iterations to converge. Are you looking for it to display at the very end a Success/Failure message? The...

26 días ago | 0

Answered

NEED HELP SOLVING "Array indices must be positive integers or logical values"

Does it need to be a one-liner? If you can grab the x,y coordinate, you could clamp your index points to the box bounds using %...

NEED HELP SOLVING "Array indices must be positive integers or logical values"

Does it need to be a one-liner? If you can grab the x,y coordinate, you could clamp your index points to the box bounds using %...

26 días ago | 0

Answered

Change Simulink parameters in Matlab function

Simulink will look for variables in MATLAB's base workspace by default. Since var1 and var2 are defined in the function's worksp...

Change Simulink parameters in Matlab function

Simulink will look for variables in MATLAB's base workspace by default. Since var1 and var2 are defined in the function's worksp...

27 días ago | 0

Answered

Error with an empty array - Subscript indices must either be real positive integers or logicals

You're subscripting a logical IXY, which will only retrieve indices that evaluate to true from HEIGHTS. Is it possible that all ...

Error with an empty array - Subscript indices must either be real positive integers or logicals

You're subscripting a logical IXY, which will only retrieve indices that evaluate to true from HEIGHTS. Is it possible that all ...

27 días ago | 0

Answered

Grabbing Years of table data to Create New Tables

A fast solution might be to use the Timestamp to extract the date for each row and then use the group capabilities of tables. ...

Grabbing Years of table data to Create New Tables

A fast solution might be to use the Timestamp to extract the date for each row and then use the group capabilities of tables. ...

27 días ago | 0

Answered

I need help with step function

Hi Anna, The (unit) step function is basically a function that goes from 0 to 1, generally at time 0, scaled by whatever magnit...

I need help with step function

Hi Anna, The (unit) step function is basically a function that goes from 0 to 1, generally at time 0, scaled by whatever magnit...

3 meses ago | 0

Answered

Problems With Function Error

Up until recently, MATLAB had a requirement to separate scripts from functions. A file could hold one but not both types. Now, i...

Problems With Function Error

Up until recently, MATLAB had a requirement to separate scripts from functions. A file could hold one but not both types. Now, i...

4 meses ago | 0

Answered

Assigning or replacing elements of another array into an array based on indices

Ali, I suggest you use logical indexing for this instead of FIND. It's faster and a little cleaner. Hope this helps! b = [0 ...

Assigning or replacing elements of another array into an array based on indices

Ali, I suggest you use logical indexing for this instead of FIND. It's faster and a little cleaner. Hope this helps! b = [0 ...

4 meses ago | 0

Answered

Error using figure First argument must be a figure object or a positive Integer

Figure is a function. Try: figure(4) This should activate a figure with ID number 4.

Error using figure First argument must be a figure object or a positive Integer

Figure is a function. Try: figure(4) This should activate a figure with ID number 4.

4 meses ago | 0

Answered

Run Simulink Model as a Function

Hi Sze, To clarify, you're hoping to run a simulink model from within a call to ODE45? While possible, I'm afraid this is goi...

Run Simulink Model as a Function

Hi Sze, To clarify, you're hoping to run a simulink model from within a call to ODE45? While possible, I'm afraid this is goi...

4 meses ago | 0

| accepted

Answered

find max value of structure

If I'm understanding correctly, you have a struct array, s, of size 1x30, with a single field (let's call it x). Something like...

find max value of structure

If I'm understanding correctly, you have a struct array, s, of size 1x30, with a single field (let's call it x). Something like...

5 meses ago | 0

Solved

Word Counting and Indexing

You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

5 meses ago

Solved

Test for balanced parentheses

Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

5 meses ago

Solved

Flip the vector from right to left

Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

5 meses ago

Solved

Whether the input is vector?

Given the input x, return 1 if x is vector or else 0.

5 meses ago

Solved

Doubling elements in a vector

Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

5 meses ago

Answered

Derivative from ode45

Generally I send the result of ode45 back through my function as a post-processing step. [t,x] = ode45(@myDerivFcn,tspan,x0) ...

Derivative from ode45

Generally I send the result of ode45 back through my function as a post-processing step. [t,x] = ode45(@myDerivFcn,tspan,x0) ...

5 meses ago | 0

Answered

How to solve two differential equations simultaneously with one having a matrix form of initial condition?

Hi Adham, Just to be clear, it's an ordinary differential equation, is /? If so, and each matrix term is separable, then you ...

How to solve two differential equations simultaneously with one having a matrix form of initial condition?

Hi Adham, Just to be clear, it's an ordinary differential equation, is /? If so, and each matrix term is separable, then you ...

5 meses ago | 0

| accepted