Answered
How to set an array in matlab?
I'm not really sure what your question is. Are you trying to do this? clear all A1=input('What is the value of A ','s')...

12 years ago | 0

Answered
Hi , i installed matlab 2013b after dspace controldesk 3.5 but the dspace not defined in simulink.please any help to solved this problem without reinstall dspace.
Please review the compatibility tables for your versions of MATLAB and dSPACE carefully. For MATLAB 2013b you will need dSPAC...

12 years ago | 0

Answered
calculate the integral of sin of x
No, the integral of sin(x) is -cos(x)+C. Now you must solve for C. If you double click your integrator you will see that y...

12 years ago | 1

| accepted

Answered
how can I link the simscape tools with the commonaly used blocks in simulink in matlab.
You need to use the Simulink to Physical Signal converter blocks. <http://www.mathworks.com/help/physmod/simscape/ref/simulin...

12 years ago | 0

Answered
How to find the mean of data contained in a column of a table?
a=[1 11; 2 22; 3 33; 4 44; 5 55] b=mean(a) b = 3 33

12 years ago | 0

| accepted

Answered
How can I avoid Algebraic loops In these equations
If you are smart about it, you may be able to avoid a memory block. Depending on the properties of your numbers (for example, i...

12 years ago | 0

| accepted

Answered
Solving dynamic system of equations with parameters
Due to the way _solve_ choses the variables to solve for ( _symvar_ ), you may not need to specify the variables at all. For ex...

12 years ago | 0

| accepted

Answered
how can write sigma in matlab???????
If you are saying you want to put sigma, the greek letter σ, as a variable in a formula, you cannot. You must use english lette...

12 years ago | 0

Answered
How can I set no initial value for the unit delay block ??
You must have an initial value for switch2 so that it knows which of the [111] or [000] to start with. Therefore you must have ...

12 years ago | 0

| accepted

Answered
Why can't I see some parameter values in simulink?
It has been my experience with SimPowerSystems (which I assume sps stands for) that they mask several of the implementation deta...

12 years ago | 1

| accepted

Answered
I cant take inverse of J matris. it is jacobian.
simplify(J*inv(J)) ans = [ 1, 0, 0, 0] [ 0, 1, 0, 0] [ 0, 0, 1, 0] [ 0, 0, 0, 1]

12 years ago | 1

| accepted

Answered
Why can't matlab solve if a constant value is supplied?
Your "f" does not have a real valued solution (it has imaginary components). Perhaps you have an error in your equations for M ...

12 years ago | 0

Answered
Simulink scope time resolution on X Axes
I have a similar complaint, but I assume they just decided it was too hard to try to fit all the significant digits on a small p...

12 years ago | 0

Answered
Array to plot regarding position, please help
To make your matrix "less confusing" you can reshape it into a 3d matrix. For example: myarray3=permute(reshape(myarray',3...

12 years ago | 0

Answered
using Battery Voltage in Algebraic Loops
You most likely have an algebraic loop because you are trying to use the value of the battery voltage in a calculation for the c...

12 years ago | 0

Answered
matlab simulink should count how many times the value of a signal coming out of a simulink block changes. How can i realize this ???
You can use a "triggered subsystem" block and set the trigger to "either". Use your signal value as the trigger. Then inside...

12 years ago | 2

| accepted

Answered
How to take only few rows in a large matrix
You can use the function unique() [C,IA,IC]=unique(A(:,2)) A(IA,:) Or perhaps if you already know the indicies of the r...

12 years ago | 0

Answered
Finiding Peaks and plotting in 3D
I ran your code and it works fine for me as long as I change the first line from tx =linspace(-30, 30, 49*49); to t...

12 years ago | 0

Answered
Newton's Method returns complex value.
If this is a school project requiring that you use Newton's method on some non-smooth function, than your professor probably is ...

12 years ago | 0

Answered
How do I add a legend to a plot with multiple data sets and 3 curves per data set?
1) During your loop, create an array of handles that you want. h(i)=H1; % just add the handle for one of the three plots fo...

12 years ago | 0

| accepted

Answered
Returning the results of a function in a matrix
If your function above is working, you can just call it from another function as many times as you need. Of course if you are d...

12 years ago | 0

Answered
Stuck with for loop with harmonic frequency algorithm
for idx=1:length(A) y(idx,:) = A(idx) * sin(linspace(0, nSeconds * Harm(idx) * 2* pi, nSeconds*Fs)) end

12 years ago | 1

| accepted

Answered
how can i access signals on a bus in simulink ?
Use the "Bus Selector" block to get the signals you are interested in. From the documentation: Bus Selector: Select signa...

12 years ago | 0

Answered
I found strange error in matlab R2013a calculation using0 'floor'
Because floating point math is a strange thing. Try setting format long and then rerun your above calculations. (Re...

12 years ago | 0

Answered
How do I get MATLAB to automatically build a column of cell array data based on an array of varying numerical values?
There are lots of ways. A couple simple examples you can play with to help you get started: 1) year_names={70, 'seventy'...

12 years ago | 0

| accepted

Answered
How to store value for multiple iteration
a= 10; b= [1 0 0 0 1 0 1 0 1 0;1 1 0 0 1 0 1 0 1 1;1 0 1 0 1 0 1 1 1 0;1 1 1 1 1 0 1 0 1 0;1 0 1 0 1 0 1 0 1 0 ]; e= [0....

12 years ago | 1

| accepted

Answered
How to avoid the split line
Are you allowed to give it a bit more resolution? Changing just the first line solved it for me: [Th,Ph]=meshgrid(-20:.1:20...

12 years ago | 0

Solved


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

12 years ago

Solved


Calculate the Levenshtein distance between two strings
This problem description is lifted from <http://en.wikipedia.org/wiki/Levenshtein_distance>. The Levenshtein distance betwee...

12 years ago

Load more