Answered
convert struct2mat
This example perfectly works for me. Are you sure that your _class_ struct is really a struct, or what kind of field does it con...

8 years ago | 0

| accepted

Answered
t1 range is 0.1 to 2 and t2 range is 0.1 to 2.....and t1+t2 should not be greater than 2
t1=0:0.1:2; t2=0:0.1:2; t=t1+t2; t(t>2)=[];

8 years ago | 1

| accepted

Answered
How to use while loop in this condition?
One approach: %code while true if QR>0 T=T+1; elseif QR<0 T=T-1; else break; ...

8 years ago | 0

Answered
How to combine the different file scope output into one scope
You need to use *Mux* to gather 3 signal and by using *To Workspace* block, you need to save those signals after simulation. Set...

8 years ago | 0

| accepted

Answered
Why tout is different from the result of time block in Simulink?
Actually, this has something to do with your *solver settings*. Probably, your _solver type_ is set to *variable step* and you r...

8 years ago | 4

| accepted

Answered
How to store Appdesigner parameters in MATLAB workspace?
For initializing the parameters, you may use *InitFcn* in your Simulink model. It is located at *File->Model Properties->Model P...

8 years ago | 0

| accepted

Answered
How to integrate (e^x)/x from limit 1 to 2 using inbuilt commands?
Basically, *Riemann Sum Implementation* should help you here: f=@(x) exp(x)./x; dt=0.0001; ii=1:dt:2; res=0; fo...

8 years ago | 1

| accepted

Answered
Extraction of parameters for a function
Firstly, define two vectors in your workspace: x=0:0.01:pi; y=cos(x); Now, open *Curve Fitting* app and see the attache...

8 years ago | 0

| accepted

Answered
How to sort any size matrix elements from largest to smallest using loop?
One simple way is to use *Bubble Sorting* algorithm: v=[4 7 2 9 6 1;8 2 9 4 0 5] %demo data for i=1:size(v,1) for...

8 years ago | 1

Answered
What is the name of the toolbox I need to use "combvec" function?
You need *Neural Network Toolbox*.

8 years ago | 2

| accepted

Answered
Getting "Error: This statement is incomplete."
You seem to be missing _end_ of the first *for loop*. Use this simplified code: figure; v1 = [1 0 -5 0 0 4]; i=-3...

8 years ago | 0

Answered
Error- Assignment has more non-singleton rhs dimensions than non-singleton subscripts?
Well, your problem comes from the fact that you try to put your *A* vector into one single element of _dcburn_ everytime and thi...

8 years ago | 0

| accepted

Answered
I wrote a program.( It indicating this error:Struct contents reference from a non-struct array object.)please help me,where the error is?
The error is in the _for loop_, where you typed something like B.b at the end. I am not sure what you tried to do with it...

8 years ago | 1

| accepted

Answered
Symbol to double error, 0x0 syms
You need to assign a numeric value when a solution is not found. Your array has to have a numeric value for each element of it i...

8 years ago | 0

Answered
I want to find the peak values of the out put signal.
Your input order should be like: [pks,locs] = findpeaks(abs(yshift),fshift) if you check the documentation. With this, yo...

8 years ago | 0

Answered
is damp function got any limitation?
I don't understand clearly your question, but the damping ratio and natural frequency can be found mathematically as follows: ...

8 years ago | 1

| accepted

Answered
How to make the second derivative of x and y?
Use *diff* with _two input arguments_ as: diff(x,2)

8 years ago | 0

Answered
How to match two arrays with its index and extract the value ?
Simply do this: [~,idx]=sort(C,'ascend') O=B(idx)

8 years ago | 0

Answered
How solve S0 value if a x,and d values are given.
Try this: Note that I randomly gave _a, lamda_, therefore you can change them. syms s0(x) n a=1;lamda=2;%random value...

8 years ago | 0

Answered
could anyone help me to plot the graph for the result shown below.
A=output1(:,1,:);B=output1(:,2,:); plot(reshape(A,size(output1,3),1),reshape(B,size(output1,3),1))

8 years ago | 0

| accepted

Answered
Is it an integer value?
Use *isinteger* to test whether it is integer or not: isinteger(1.7008e+05) ıt will give logical *0*, which means it is n...

8 years ago | 0

| accepted

Answered
Compare each element of matrix
if all(C<=0) disp('Error'); elseif all(C>0) %code goes here end

8 years ago | 0

Answered
How to extract matrix elements using index pairs?
r=[1 2]; c=[1 2]; A(sub2ind(size(A),r,c))

8 years ago | 4

| accepted

Answered
PZMAP IS NOT ACCURATE
Do not be bothered by that. You know that the magnitude of the pole should give you *1*: 0.9995^2+0.0314^2=1 The reason i...

8 years ago | 0

Answered
Hi! everyone, Please I want to convert a matlab file .mat to data file .data or .text ..can anyone help me please, Thanks.
*dlmwrite* should help you. Consider the following approach: M=[1 2 3;4 5 6;7 8 9];%demo data dlmwrite('myfile.txt',M);%yo...

8 years ago | 0

| accepted

Answered
Creating a random permutation that always start with a specific value
It sounds like *randi* function can help you. First argument specifies the interval that integer values will be generated. Secon...

8 years ago | 0

| accepted

Answered
how to write summation with limits?
Try this: syms mu variance x(i) n=5;% you can change it mu=symsum(x,i,1,n)/n variance=symsum((x-mu).^2,i,1,n)/n

8 years ago | 0

Answered
i want to set array or data set as an input in my simulink model ...please help me to do this..??
For this purpose, use *From Workspace* block. Check how I formed the data inside the block. Hope this helps. Let me know if it w...

8 years ago | 0

Answered
How to match pairs of elements to known corresponding values?
This problem does not need a _for loop_ to be solved. Instead, you can use *ismembertol* for this purpose. spec_freq =1.0e...

8 years ago | 0

Load more