Domanda


Window appears while code is runnig
Hello, I'm trying to create library with some |SimPowerSystem| blocks. When I use blocks from my library in |Simulink| model ...

quasi 7 anni fa | 1 risposta | 0

1

risposta

Risposto
How can I have a timed (15 minutes) output signal based on external trigger? I want to generate an output HIGH signal for 15 minutes based on a event detection impulse signal.
Hello, This is the model with standart Simulink blocks. Output from |Switch1| is the desired signal. The |Compare To Const...

quasi 7 anni fa | 0

Risposto
subs( ) command would not work
Hello, you should to reassign variable after substitution: A=subs(A,a,1);

quasi 7 anni fa | 1

| accettato

Risposto
How to find the determinant of 15 X 15 symbolic matrix?
Hi, I encountered the similar problem recently and I wrote a simple script for this task. It's designed for parallel computin...

quasi 7 anni fa | 0

Risposto
How to preview the fields of a struct array and to select just some of them.
Hi. You can get list of fields of structure by <https://www.mathworks.com/help/finance/fieldnames.html filednames> and adress...

circa 7 anni fa | 0

Risposto
How to align two different sets of data whilst allowing a +- 10% range?
Hi)) %converting and renaming of variables t=table2array(table1); m=matrix2; %0.1 - range of choosing d=1+0.1*[...

circa 7 anni fa | 1

| accettato

Risposto
Find the index of a string is structure
As i understand you right, the field textdata contains cell array with some strings. Let figure that |A| - structure. Then if y...

circa 7 anni fa | 1

| accettato

Risposto
How to count continuous non zero elements whilst keeping the date of the first non-zero value
Hi. It's the simplest but not the shortest code for this problem. k=A(1,6)~=0; for i=1:size(A,1) if A(i,6)~=0&...

circa 7 anni fa | 1

| accettato

Risposto
GA is not working...Function i have written separately calling in main program but not worked??
There are two version of code which are working but do not converge. First: xdata =[ 1 2 3 4 5 6] ; ydata=(1./(xd...

circa 7 anni fa | 0

| accettato

Risposto
How can I put the values that I made in a for and if loop into a vector?
Code improvements: %Range of i for different calculation formulas FirstRange=[1:L_1]; SecondRange=[L_1:L]; %Create...

circa 7 anni fa | 0

Risposto
merging two text files and generate 1000 copies of the new text (or dat) file
You should to read help for <https://www.mathworks.com/help/matlab/ref/sprintf.html sprintf> and <https://www.mathworks.com/help...

circa 7 anni fa | 1

| accettato

Risposto
I can't open .fig files .m files nothing
You should to click on the "Browse" button and specify the path to your matlab program file which may be "C:\Program Files\MATL...

circa 7 anni fa | 0

| accettato

Risposto
could anyone tell me how to have equal spacing of selected numbers with respect to axis.
You can compress data between 2 and 23 ticks roughly by %before plotting XData(XData>2&XData<23)=(XData(XData>2&XData<23)-...

circa 7 anni fa | 0

Risposto
What does the ω_r represent in the Mechanical System Equation provided in the Permanent Magnet Synchronous Machine
Hello, That is also mechanical speed because that is equation of mechanical speed. Maybe in the full system of equations of S...

circa 7 anni fa | 0

Domanda


Error is occured when I changed version of Matlab
I have a lot of the code which work correctly in the Matlab 2013b but when I tried evaluate it on the machine with Matlab 2016a ...

circa 7 anni fa | 1 risposta | 0

1

risposta

Domanda


Does symbolic function inv() evaluated in multithread?
Hello, as noted here <https://www.mathworks.com/matlabcentral/answers/95958-which-matlab-functions-benefit-from-multithreaded...

oltre 7 anni fa | 1 risposta | 0

1

risposta

Risposto
How to repeat a code and build upon previous run's results?
Try this. I hope I understand you right. CostsMtx=[16,18,17,20,17;25,27,29,32,28;1.5,1.6,1.7,2,1.8;50,54,56,60,57;60,63,65...

oltre 7 anni fa | 0

| accettato

Domanda


Accuracy in Simulink in transient process calculation
Hi, I try calculate current in scheme (figure below). <</matlabcentral/answers/uploaded_files/77571/1.png>> There are s...

quasi 8 anni fa | 1 risposta | 0

1

risposta

Risposto
What is the best way to rotate a line from a central point?
Hi, try this: %y, x - line coordinates %a, b - point coordinates %phi - rotating angle in radians counterclockwise ...

quasi 8 anni fa | 0

Risposto
Counting syllables in text from a txt file.
If i understand you right, try this. vowels={'A','I','O','U','E'}; hF=fopen('filename.txt'); %sum contains count of vow...

quasi 8 anni fa | 0

Domanda


Error: subscript indices must either be real positive integers or logicals.
Hello, this part of function doesn't working and I don't have any idea why. hA=axes; hold on for i=1:length(Data) ...

circa 8 anni fa | 1 risposta | 0

1

risposta

Domanda


Analog VBA statement "with ... end with"
I need declare a lot (real many) fields of structure with long name. How i can do it without using loop? For example: Horr...

circa 8 anni fa | 0 risposte | 0

0

risposte

Risposto
Infinite sum of a series
Try this. It seems you forgоt declare the |p|. syms z p r=2.5e-6/2; alpha= acosh(z/r); A= (2*sinh(((2*p)+1)*alp...

circa 8 anni fa | 0

Risposto
data generation from given
Define |t|: t=[0:1e-3:1e-1]; Define |y|: y=10*sin(200*t)+20*cos(200*t.^2); Save data: %to txt fID = fopen('t...

circa 8 anni fa | 0

Risposto
Modeling efflux time from a tank. Equation 11 in the attached document
I think it can be helpful. You have this function with |A, B, C, D| are known: fun = A * (dHdt)^2 + B * (dHdt)^1.75 + C *...

circa 8 anni fa | 0

Domanda


Access to parent object or problem with organize class
Hi, I need to attache some methods to the particular object |obj|. These methods stored to packages (folder with "+" in name)...

circa 8 anni fa | 1 risposta | 0

1

risposta