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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 1

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

oltre 5 anni fa | 0

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

| accettato

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

quasi 6 anni fa | 0

Risolto


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

quasi 6 anni fa

Risolto


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

quasi 6 anni fa

Risolto


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

quasi 6 anni fa

Risolto


Create a vector
Create a vector from 0 to n by intervals of 2.

quasi 6 anni fa

Risolto


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

quasi 6 anni fa

Risolto


Find max
Find the maximum value of a given vector or matrix.

quasi 6 anni fa

Risolto


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

quasi 6 anni fa

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

| accettato

Risposto
Problem with xlim when having date
Hi Behzad, xlim sets the absolute max and min of the graph that you're looking at. To set the interval for grid lines, use the ...

quasi 6 anni fa | 2

| accettato

Risposto
Running ode45 from problem statement
Hi Daniel, For your problem, you were very close and had the solutions to each equation worked out correctly. The function sign...

quasi 6 anni fa | 1

| accettato

Risposto
please help me, how do I make the code for the equation in the following picture?
You can't code an infinite sum exactly, but fortunately, this one is bounded (x^2 on the denominator and the numerator is bounde...

quasi 6 anni fa | 0

Risposto
Sort data based on different column
Try using the sortrows command in conjunction with a transpose. Apply it once to exploit column sorts (e.g. Column 1 is Row 1 ab...

quasi 6 anni fa | 0

| accettato

Risposto
Mimicking the font that title() uses when calling it with latex interpreter
Try using the Tex interpreter with the \bf switch? title('\bf\nabla TITLE','Interpreter','tex') seems to get the bold you're lo...

quasi 6 anni fa | 0

Risolto


Renaming a field in a structure array
MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

quasi 6 anni fa

Risolto


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

circa 6 anni fa

Risolto


Inner product of two vectors
Find the inner product of two vectors.

circa 6 anni fa

Carica altro