Community Profile

photo

Raj


95 total contributions since 2019

Contact

Raj's Badges

  • Knowledgeable Level 3
  • 3 Month Streak
  • Thankful Level 1
  • Revival Level 2
  • First Answer

View details...

Contributions in
View by

Answered
how to read previous data
Define alpha in an array and use the previous two elements by suitable indexing in a 'for' loop. Something like this: n=input('...

32 Minuten ago | 0

Answered
Bring To Workspace variables from Simulink to base workspace from a matlab function
Use Simset. See details here. The 'DstWorkspace' property specifies the workspace in which to assign any variables defined in th...

etwa eine Stunde ago | 0

Answered
Trouble with difference equation
1) For which value of 'a' are you trying to plot the stem graph? If for all the values from a=0:0.01:11 then shift the plot outs...

etwa 23 Stunden ago | 0

Answered
license manager error -103
See here: https://in.mathworks.com/matlabcentral/answers/91874-why-do-i-receive-license-manager-error-103 Also, See here: htt...

ein Tag ago | 0

Answered
How do I obtain the matrix Q and R in LQR?
My response is quite late but since nobody has answered this question let me give a try. Maybe it'll benefit other people with s...

2 Tage ago | 0

Answered
Automatic data exporting/saving into "to workspace"
Question is not very clear. What I undertand is that you want to save some data to workspace. But instead of continuously saving...

2 Tage ago | 1

| accepted

Answered
Can a Simulink Modell, which been saved with Matlab 2011b, be opened with Simulink/Mtlab2016b?
Yes you can open a model created in 2011b version in 2016b version. However you need to be a bit careful here. If your model con...

3 Tage ago | 0

Answered
double arrows << are lost
You should have attached a screenshot with your question. Nevertheless see this post: https://in.mathworks.com/matlabcentral/an...

3 Tage ago | 0

Answered
Reading/writing in data from set of text files in loop
You can use 'sprintf' command in a loop to achieve this. Something like this: Mydata = zeros(100000, 10); for i=1:1 % Number o...

3 Tage ago | 1

Answered
Effect of Unit Delay Block on Linked Models
You are right about the part that use of unit delay block has caused unexpected results. I have faces similar problems while des...

3 Tage ago | 0

Answered
Selecting Elements of an Array in Simulinks Based on Simulation Time
Since you have not shared your model, its difficult to give a precise answer. I assume you must be using user defined matlab fun...

6 Tage ago | 0

Answered
Can I add units to the table?
"Can I add units to the variables in the table?" Yes you can. You can specify units for each variable in the table by modifying ...

6 Tage ago | 0

Answered
How to store output for each input.
clc inputNames = {'mat1.mat', 'mat2.mat', 'mat3.mat'} length(inputNames) for i = [1:length(inputNames)] load(inputNames{...

6 Tage ago | 1

| accepted

Answered
How to track a command control in aircraft model using state-space representation
I have a few observations here: So basically you can just change the states error matrix as per your desired value (velocit...

6 Tage ago | 1

Answered
A code that freezes Matlab on 'busy' at some values.
The code is not actually freezing and there is no issue with MATLAB. Its just the way your code is written. Try putting breakpoi...

6 Tage ago | 0

Answered
How to assign values to 100 by 2 matrix?
A=[2 3] A1=[A(1)*ones(100,1) A(2)*ones(100,1)]

8 Tage ago | 1

Answered
I need to make 150 plots which I want to do in for loop. To best view these plots, I want to export them to a single PDF.
I think this would help: https://in.mathworks.com/matlabcentral/answers/232417-saving-plot-as-pdf-in-loop https://in.mathworks...

8 Tage ago | 0

Answered
Finding average of a sensor signal
This should help: https://in.mathworks.com/matlabcentral/answers/367412-how-to-calculate-moving-average https://in.mathworks.c...

9 Tage ago | 0

| accepted

Answered
Apply Frequency Response Function to time series
You can do this easily in Simulink. Create a model of H(f) using the transfer function block. Load your input in workspace and p...

9 Tage ago | 0

Answered
Formulation to Matlab code
Since your equation asks for 'log' not 'ln' , I think the code should be: for i=1:N S(i) = -PT(i) * log10(PT(i)); end

9 Tage ago | 0

Answered
Search all elements from from array A in array B and write it workspace
Your thinking is basically correct. for i = 1: length(Array A) % Start with first element of A if Array A(i) = [Array B] % com...

9 Tage ago | 0

Answered
dimension consistency of matrix
A=[1;2;3;4;6;1;3;4;5;6] B=[2;4;3;1] B= [B;zeros(numel(A)-numel(B),1)]

9 Tage ago | 0

Answered
Explanation of question on (past) test, but do not understand please help
Its quite straightforward. See the array 'v' elementwise like this: v=[-9 3 2 10 4 -12 14 -1]; 1) First element is -9. The for...

9 Tage ago | 0

| accepted

Answered
How PI control tuned using the error information ?
I'll assume you have a set of time domain (rise time, settling time, overshoot etc) or frequency domain (gain margin, phase marg...

9 Tage ago | 0

Answered
How do I finish coding this problem?
Are you sure your question is answerable? I mean does such a number even exists? Anyways, I wrote this code and ran it for abou...

10 Tage ago | 0

| accepted

Answered
How to generate dummy variables based on multiple if criteria
Lets say you have 10 participants, so a total of 100 dataset. I'll assume you already have your id, taskno, treatno and choice a...

10 Tage ago | 1

| accepted

Answered
On Off switch simulink
There are many ways you can approach this problem. One way is to convert your entity server model as an Triggered sub system. Th...

10 Tage ago | 0

Answered
For a control system model having an inner loop and an outer loop. How to simulate this model when inner loop has higher sampling rate than outer loop?
Use "Rate transition" blocks for transfer of data between your inner loop and outer loop. For the data going into outerloop from...

10 Tage ago | 0

| accepted

Answered
Why am i getting "Unable to perform assignment because the indices on the left side are not compatible with the size of the right side"
You must be getting error at line number 34 in your code. That's because your 'ra' is a 1x11 double type matrix which (after di...

13 Tage ago | 0

| accepted

Answered
what is the difference between data types single and double in simulink ?
Your floating point data (Decimal Data) can be represented either via Single data type of Double data type. The basic difference...

15 Tage ago | 0

| accepted

Load more