Why wont this run? "Array indices must be positive integers or logical values."
Most likely typo f = (1/(2*(pi)))*(L*C*(((R1^2)*C-L)/((R2^2)*C-L)))^(1/2)

23 dagen ago | 0

How do I define and use a standard range written by variable
N=10; % provide a reasonable number based on the range of input data n=1:N; LowBound=690*n; HighBound=1200*n; InputData=[...

24 dagen ago | 0

The error has nothing to do with the script. According to the error message, your simulation step size is fixed, 1 second. Howev...

25 dagen ago | 0

Calculating that power supply won't burn my laptop
Modern power supplier/charger are all "smart" devices. The power/volt/max current numbers are not derived directly from the simp...

29 dagen ago | 0

Cannot get points on a plot to show
You are plotting one point at a time, use plot(N,error(N),'+') or at the end, plot(1:10,error)

30 dagen ago | 0

| accepted

Assign a number to a letter in excel
X1={'A','B','C'}'; y=cell2mat(X1)-64

30 dagen ago | 0

30 dagen ago | 0

Help with restricting input
Suprisingly, just run your specification and it works in MATLAB number=input('Enter a whole number between 1 and 100:') while ...

30 dagen ago | 0

| accepted

Index Exceeds the number of array elements (993268)
If you have an array with 10 elements but you are trying to access the 11th element, you got this error. Just step through your ...

30 dagen ago | 0

| accepted

how can I compute distances:
Run the code and then run "license inuse". Only MATLAB is needed.

ongeveer een maand ago | 0

results=sim('mymodel')

ongeveer een maand ago | 0

I want to generate a time vector
datetime([0,0,0,6,30,0]):minutes(5.12):datetime([0,0,0,15,0,0])

ongeveer een maand ago | 0

How do I programmatically set the parameters of a Simulink-PS Converter?
Click one such block in your model and run "get(gcbh)" in Command Window to learn about its properties and values. You could do...

ongeveer een maand ago | 1

| accepted

Drawing Rectangle/Lines with data
rectangle('Position',[0 0.15 0.012 0.012]) axis([0 0.02 0 0.2])

ongeveer een maand ago | 0

| accepted

Mysterious "Operands to the || and && operators must be convertible to logical scalar values." error
this line if ~isempty(infMessage) && strmatch('optimlib:optimfcnchk',infMessage)

ongeveer een maand ago | 0

How can I iteratively create blocks in simulink/simscape and populate them with variables?
What you need are functions like add_block(), add_line(), set_param() Follow examples in this section of the document "Programm...

ongeveer een maand ago | 1

| accepted

How to check for common elements among multiple arrays ? Number of arrays are more than 100 and sizes vary for each array
Use a loop Com=intersect(out{1,1},out{1,2}); for k=3:size(out,2) Com=intersect(Com,out(1,k)); if isempty(Com) break; end ...

ongeveer een maand ago | 0

| accepted

Compiled application does not write to diary log file
I think you are right. The cause is that there is no Command Window in your compiled app. I would suggest writing to a specific...

ongeveer een maand ago | 0

| accepted

How to change the initial condition of a block in the model with Simulink.Parameter?
The initial condition can be regarded as a state. Use the "State Writer" block. Follow examples. https://www.mathworks.com/help...

ongeveer een maand ago | 0

Error using str = input(prompt,'s')
YesNo = input(prompt2,'s')

ongeveer een maand ago | 1

| accepted

How can I create logsout in base workspace after running sim(), without disabling fast restart?
When using sim(), the result need to be returned logsout=sim('TestLogsout2','ReturnWorkspaceOutputs', 'on')

ongeveer een maand ago | 0

How to set 'PreserveVariableNames' to True while importing an Excel file into matlab?
help readtable 'PreserveVariableNames' Flag to preserve variable names, specified as true or fals...

ongeveer een maand ago | 0

| accepted

Question

Did anyone have any problem? When I click "My Answers", it shows both my questions and answers with questions listed first. Sa...

ongeveer 2 maanden ago | 7 answers | 0

### 7

fill up a cell array with string elements
This is all you need words=split('this is a sentence.')

ongeveer 2 maanden ago | 0

use %, not %% and provide real contents for examples and "See also".

ongeveer 2 maanden ago | 0

sl_customization - Update Lookup Table Data (Non-Standard Format)
As far as propagating modified data back to its source variable, it doesn't matter whether the source variable is in the base wo...

ongeveer 2 maanden ago | 0

how to import C code files or precompiled libraries into Simulink

ongeveer 2 maanden ago | 0

Error when using breakpoints in Simulink
Can you run "mex -setup" and follow instructions to select your local MinGW as the C compiler.

ongeveer 2 maanden ago | 0