Category: Matlab
Category Archives: Matlab
How to convert displacment data in time series to frequency domain ie (from Amplitude (m) v/s time (s) to Amplitude (m) v/s Frequency (Hz)) using fourier transform
Hi,
I have a excel sheet containing data of heave response in meters v/s time from 1 to 1000seconds. This is the heave response of a structure subjected to regular wave of 3 m wave height. I need to convert it into frequency domain data ie heave response vs frequency in Hz.
File attached contains time series data ( Column A is time and Column B is the response ).
please help me regarding the sameHi,
I have a excel sheet containing data of heave response in meters v/s time from 1 to 1000seconds. This is the heave response of a structure subjected to regular wave of 3 m wave height. I need to convert it into frequency domain data ie heave response vs frequency in Hz.
File attached contains time series data ( Column A is time and Column B is the response ).
please help me regarding the same Hi,
I have a excel sheet containing data of heave response in meters v/s time from 1 to 1000seconds. This is the heave response of a structure subjected to regular wave of 3 m wave height. I need to convert it into frequency domain data ie heave response vs frequency in Hz.
File attached contains time series data ( Column A is time and Column B is the response ).
please help me regarding the same fft conversion MATLAB Answers — New Questions
Why does my GPU not outperform my CPU/another GPU? Troubleshooting Steps
Why does my GPU not outperform my CPU / another GPU?
Here are some troubleshooting steps to understanding factors which affect performance.Why does my GPU not outperform my CPU / another GPU?
Here are some troubleshooting steps to understanding factors which affect performance. Why does my GPU not outperform my CPU / another GPU?
Here are some troubleshooting steps to understanding factors which affect performance. gpu, graphics, performance, kernel, timeout, benchmark MATLAB Answers — New Questions
What does v51 or v37 or v46 etc. mean in license manager?
I am trying to make a tool to help my company organize our MATLAB license use. Currently I am using the command "lmutil lmstat -a -c <license server>" and I’m just parsing the string output. The command prints out each type of license we have such as MATLAB, SIMULINK, etc. then within each license section it prints information about the license for a certain block of users in a nodelocked or floating license. I’m guessing this is grouped by location like IP addresses of the same location or something similar. Within this information, right next to the license type it prints v51 or v46 or some 2 digit number. For example the section starts with MATLAB v51. Then below that section it prints information about each user currently using that license. Each user line also prints out a vXY, and it can be the same or different than the corresponding license above. For example MATLAB v51 could have a user with v37. I’m just wondering what this v number means. Does it correspond to a MATLAB version somehow? If not, is there other information in the output that would tell me a users version?I am trying to make a tool to help my company organize our MATLAB license use. Currently I am using the command "lmutil lmstat -a -c <license server>" and I’m just parsing the string output. The command prints out each type of license we have such as MATLAB, SIMULINK, etc. then within each license section it prints information about the license for a certain block of users in a nodelocked or floating license. I’m guessing this is grouped by location like IP addresses of the same location or something similar. Within this information, right next to the license type it prints v51 or v46 or some 2 digit number. For example the section starts with MATLAB v51. Then below that section it prints information about each user currently using that license. Each user line also prints out a vXY, and it can be the same or different than the corresponding license above. For example MATLAB v51 could have a user with v37. I’m just wondering what this v number means. Does it correspond to a MATLAB version somehow? If not, is there other information in the output that would tell me a users version? I am trying to make a tool to help my company organize our MATLAB license use. Currently I am using the command "lmutil lmstat -a -c <license server>" and I’m just parsing the string output. The command prints out each type of license we have such as MATLAB, SIMULINK, etc. then within each license section it prints information about the license for a certain block of users in a nodelocked or floating license. I’m guessing this is grouped by location like IP addresses of the same location or something similar. Within this information, right next to the license type it prints v51 or v46 or some 2 digit number. For example the section starts with MATLAB v51. Then below that section it prints information about each user currently using that license. Each user line also prints out a vXY, and it can be the same or different than the corresponding license above. For example MATLAB v51 could have a user with v37. I’m just wondering what this v number means. Does it correspond to a MATLAB version somehow? If not, is there other information in the output that would tell me a users version? license manager MATLAB Answers — New Questions
Clearly Identifying circular regions on a chip in a noisy environment
Hey everyone
As the summary suggests, I have been working with chip images in hopes of clearly identifying the circles via pre-processing so that I can binarize the image and use regionprops on them afterwards. I haven’t had much success and any help would be much appreciated. I have shared some photos that I am working with that should help!
My current algorithm is very slow but also not very good at identification.Hey everyone
As the summary suggests, I have been working with chip images in hopes of clearly identifying the circles via pre-processing so that I can binarize the image and use regionprops on them afterwards. I haven’t had much success and any help would be much appreciated. I have shared some photos that I am working with that should help!
My current algorithm is very slow but also not very good at identification. Hey everyone
As the summary suggests, I have been working with chip images in hopes of clearly identifying the circles via pre-processing so that I can binarize the image and use regionprops on them afterwards. I haven’t had much success and any help would be much appreciated. I have shared some photos that I am working with that should help!
My current algorithm is very slow but also not very good at identification. image processing, image segmentation, image analyst MATLAB Answers — New Questions
How can I use a custom board with the Zynq workflow provided by MATLAB/Simulink?
MathWorks offers an integrated workflow for targeting the Zynq platform using HDL Coder and Embedded Coder.
https://www.mathworks.com/help/hdlcoder/ug/getting-started-with-hardware-software-codesign-workflow-for-xilinx-zynq-platform.html
The currently supported boards are Zedboard, ZC702, ZC706, ZCU102.
However, I am using a board based on Zynq that is not supported by MathWorks (e.g. MicroZed, PicoZed, Arty), or a completely custom-made board. How can I use a custom board with the Zynq workflow provided by MATLAB/Simulink?
MathWorks offers an integrated workflow for targeting the Zynq platform using HDL Coder and Embedded Coder.
https://www.mathworks.com/help/hdlcoder/ug/getting-started-with-hardware-software-codesign-workflow-for-xilinx-zynq-platform.html
The currently supported boards are Zedboard, ZC702, ZC706, ZCU102.
However, I am using a board based on Zynq that is not supported by MathWorks (e.g. MicroZed, PicoZed, Arty), or a completely custom-made board. How can I use a custom board with the Zynq workflow provided by MATLAB/Simulink?
MathWorks offers an integrated workflow for targeting the Zynq platform using HDL Coder and Embedded Coder.
https://www.mathworks.com/help/hdlcoder/ug/getting-started-with-hardware-software-codesign-workflow-for-xilinx-zynq-platform.html
The currently supported boards are Zedboard, ZC702, ZC706, ZCU102.
However, I am using a board based on Zynq that is not supported by MathWorks (e.g. MicroZed, PicoZed, Arty), or a completely custom-made board. How can I use a custom board with the Zynq workflow provided by MATLAB/Simulink?
custom, board, soc, workflow, hardware, software, hw/sw, codesign, co-design, hdl, coder, zynq, xilinx, zynq-7000, all, programmable, blockset MATLAB Answers — New Questions
How to do OQPSK Demodulation in MATLAB 2020b without using inbuilt block?
I want to do modulation classification among OQPSK and QPSK. For that I require downsampled constellation (samples per symbol=1) of OQPSK. I am unable to get that in the comm.OQPSKModulator and comm.OQPSKDemodulator block of MATLAB 2020b. So I modulated the signal on my own by following steps:
a. Split bits to odd (I) and even (Q)
b. Filter both I & Q streams, e.g., with raised-cosine or half-sine filtering
c. Delay the even-bit stream (Q) by half a simple and make a complex waveform I + j*Q
Now I want to demodulate it. Please tell me the correct steps so that I can get downsampled constellation before demodulation.I want to do modulation classification among OQPSK and QPSK. For that I require downsampled constellation (samples per symbol=1) of OQPSK. I am unable to get that in the comm.OQPSKModulator and comm.OQPSKDemodulator block of MATLAB 2020b. So I modulated the signal on my own by following steps:
a. Split bits to odd (I) and even (Q)
b. Filter both I & Q streams, e.g., with raised-cosine or half-sine filtering
c. Delay the even-bit stream (Q) by half a simple and make a complex waveform I + j*Q
Now I want to demodulate it. Please tell me the correct steps so that I can get downsampled constellation before demodulation. I want to do modulation classification among OQPSK and QPSK. For that I require downsampled constellation (samples per symbol=1) of OQPSK. I am unable to get that in the comm.OQPSKModulator and comm.OQPSKDemodulator block of MATLAB 2020b. So I modulated the signal on my own by following steps:
a. Split bits to odd (I) and even (Q)
b. Filter both I & Q streams, e.g., with raised-cosine or half-sine filtering
c. Delay the even-bit stream (Q) by half a simple and make a complex waveform I + j*Q
Now I want to demodulate it. Please tell me the correct steps so that I can get downsampled constellation before demodulation. oqpsk, demodulation, offset qpsk, modulation, modulation classification MATLAB Answers — New Questions
How to create a Vector of Parameter Objects from a Simulink Model?
I am trying to create a Dual Polarisation Battery Model on simulink. I am using the Optimization Toolbox to create an experiment to run a cost function to determine parameters for my model. My model has initial parameters, which are defined in my code but I am unable to run my cost function. I am also using the sdo.optimize to run my code. Part of my code can be seen below:
open_system("BatteryModel.slx");
load("OutputCurrent.mat");
load("OutputVoltage.mat");
V_Out = OutputVoltage.Data;
I_In = OutputCurrent.Data;
time = OutputVoltage.Time;
experiment = sdo.Experiment(‘BattteryModel’);
input = Simulink.SimulationData.Signal;
input.Name = ‘HPPC Input Signal’;
input.Values = timeseries(I_In, time);
experiment.InputData = input;
output = Simulink.SimulationsData.Signal;
output.Name = ‘Output Voltage’;
output.Values = timeseries(V_Out, time);
experiment.OutputData = output;
R0_initial = param.Continuous(‘R0’ 0.01);
R1_initial = param.Continuous(‘R1’ 0.02);
R2_initial = param.Comtinuous(‘R2’, 0.1);
C1_initial = param.Continuous(‘C1’, 500);
C2_initial = param.Continuous(‘C2’, 1000);
params = [R0_initial, R1_initial, R2_initial, C1_initial, C2_initial];
opt = sdo.OptimizeOptions;
opt.Method = ‘lsqnonlin’;
[est_params, info] = sdo.optimize(@(p) costFunction(p, experiment), params, opt);
The circuit I am using can be seen below:I am trying to create a Dual Polarisation Battery Model on simulink. I am using the Optimization Toolbox to create an experiment to run a cost function to determine parameters for my model. My model has initial parameters, which are defined in my code but I am unable to run my cost function. I am also using the sdo.optimize to run my code. Part of my code can be seen below:
open_system("BatteryModel.slx");
load("OutputCurrent.mat");
load("OutputVoltage.mat");
V_Out = OutputVoltage.Data;
I_In = OutputCurrent.Data;
time = OutputVoltage.Time;
experiment = sdo.Experiment(‘BattteryModel’);
input = Simulink.SimulationData.Signal;
input.Name = ‘HPPC Input Signal’;
input.Values = timeseries(I_In, time);
experiment.InputData = input;
output = Simulink.SimulationsData.Signal;
output.Name = ‘Output Voltage’;
output.Values = timeseries(V_Out, time);
experiment.OutputData = output;
R0_initial = param.Continuous(‘R0’ 0.01);
R1_initial = param.Continuous(‘R1’ 0.02);
R2_initial = param.Comtinuous(‘R2’, 0.1);
C1_initial = param.Continuous(‘C1’, 500);
C2_initial = param.Continuous(‘C2’, 1000);
params = [R0_initial, R1_initial, R2_initial, C1_initial, C2_initial];
opt = sdo.OptimizeOptions;
opt.Method = ‘lsqnonlin’;
[est_params, info] = sdo.optimize(@(p) costFunction(p, experiment), params, opt);
The circuit I am using can be seen below: I am trying to create a Dual Polarisation Battery Model on simulink. I am using the Optimization Toolbox to create an experiment to run a cost function to determine parameters for my model. My model has initial parameters, which are defined in my code but I am unable to run my cost function. I am also using the sdo.optimize to run my code. Part of my code can be seen below:
open_system("BatteryModel.slx");
load("OutputCurrent.mat");
load("OutputVoltage.mat");
V_Out = OutputVoltage.Data;
I_In = OutputCurrent.Data;
time = OutputVoltage.Time;
experiment = sdo.Experiment(‘BattteryModel’);
input = Simulink.SimulationData.Signal;
input.Name = ‘HPPC Input Signal’;
input.Values = timeseries(I_In, time);
experiment.InputData = input;
output = Simulink.SimulationsData.Signal;
output.Name = ‘Output Voltage’;
output.Values = timeseries(V_Out, time);
experiment.OutputData = output;
R0_initial = param.Continuous(‘R0’ 0.01);
R1_initial = param.Continuous(‘R1’ 0.02);
R2_initial = param.Comtinuous(‘R2’, 0.1);
C1_initial = param.Continuous(‘C1’, 500);
C2_initial = param.Continuous(‘C2’, 1000);
params = [R0_initial, R1_initial, R2_initial, C1_initial, C2_initial];
opt = sdo.OptimizeOptions;
opt.Method = ‘lsqnonlin’;
[est_params, info] = sdo.optimize(@(p) costFunction(p, experiment), params, opt);
The circuit I am using can be seen below: optimization, help, costfunction, simulink, matlab MATLAB Answers — New Questions
Unexpected prompt characters on command line output
I am running MATLAB from command line using the following command on a linux system
$ matlab -nojvm -nodisplay < main.m
The command line ouput contains unexpected prompt characters (">>") at the beginning of the ouptut. The expected output, which is obtianed when running the code in the MATLAB command window is
>> main
Dimension 1: Range = [-9.93,9.93]
Dimension 2: Range = [-9.93,9.93]
Dimension 3: Range = [-9.93,9.93]
Size of a: 15180
Size of b: 32509
However, when run from the command line, the output looks like
$ matlab -nodisplay -nojvm < Collocate.m
< M A T L A B (R) >
Copyright 1984-2023 The MathWorks, Inc.
R2023b Update 5 (23.2.0.2459199) 64-bit (glnxa64)
November 28, 2023
For online documentation, see https://www.mathworks.com/support
For product information, visit www.mathworks.com.
>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>>>>>>>Dimension 1: Range = [-9.93,9.93]
Dimension 2: Range = [-9.93,9.93]
Dimension 3: Range = [-9.93,9.93]
>> >> >> >> >> >> Size of a: 15180
>> Size of b: 32509
And keeps going on for a few more lines. I can’t understand where the prompt symbols ">>" come from. Is there any way of getting rid of these?I am running MATLAB from command line using the following command on a linux system
$ matlab -nojvm -nodisplay < main.m
The command line ouput contains unexpected prompt characters (">>") at the beginning of the ouptut. The expected output, which is obtianed when running the code in the MATLAB command window is
>> main
Dimension 1: Range = [-9.93,9.93]
Dimension 2: Range = [-9.93,9.93]
Dimension 3: Range = [-9.93,9.93]
Size of a: 15180
Size of b: 32509
However, when run from the command line, the output looks like
$ matlab -nodisplay -nojvm < Collocate.m
< M A T L A B (R) >
Copyright 1984-2023 The MathWorks, Inc.
R2023b Update 5 (23.2.0.2459199) 64-bit (glnxa64)
November 28, 2023
For online documentation, see https://www.mathworks.com/support
For product information, visit www.mathworks.com.
>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>>>>>>>Dimension 1: Range = [-9.93,9.93]
Dimension 2: Range = [-9.93,9.93]
Dimension 3: Range = [-9.93,9.93]
>> >> >> >> >> >> Size of a: 15180
>> Size of b: 32509
And keeps going on for a few more lines. I can’t understand where the prompt symbols ">>" come from. Is there any way of getting rid of these? I am running MATLAB from command line using the following command on a linux system
$ matlab -nojvm -nodisplay < main.m
The command line ouput contains unexpected prompt characters (">>") at the beginning of the ouptut. The expected output, which is obtianed when running the code in the MATLAB command window is
>> main
Dimension 1: Range = [-9.93,9.93]
Dimension 2: Range = [-9.93,9.93]
Dimension 3: Range = [-9.93,9.93]
Size of a: 15180
Size of b: 32509
However, when run from the command line, the output looks like
$ matlab -nodisplay -nojvm < Collocate.m
< M A T L A B (R) >
Copyright 1984-2023 The MathWorks, Inc.
R2023b Update 5 (23.2.0.2459199) 64-bit (glnxa64)
November 28, 2023
For online documentation, see https://www.mathworks.com/support
For product information, visit www.mathworks.com.
>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>>>>>>>Dimension 1: Range = [-9.93,9.93]
Dimension 2: Range = [-9.93,9.93]
Dimension 3: Range = [-9.93,9.93]
>> >> >> >> >> >> Size of a: 15180
>> Size of b: 32509
And keeps going on for a few more lines. I can’t understand where the prompt symbols ">>" come from. Is there any way of getting rid of these? output, system, print MATLAB Answers — New Questions
How do I find Matlab after its installed on Linux?
I finished intalling Matlab through the linux terminal. I know the directory name is /usr/local/MATLAB/R2022b I just dont get how to find it. I used ‘cd /usr/local/MATLAB/R2022b’ which brings me into the directory, but I dont know where to go from there. Do I try to open a file under the directory? If so what file? I just need to know how to open Matlab after installing it. From what I have understood so far, I have to open it through the terminal. Please help thank you.I finished intalling Matlab through the linux terminal. I know the directory name is /usr/local/MATLAB/R2022b I just dont get how to find it. I used ‘cd /usr/local/MATLAB/R2022b’ which brings me into the directory, but I dont know where to go from there. Do I try to open a file under the directory? If so what file? I just need to know how to open Matlab after installing it. From what I have understood so far, I have to open it through the terminal. Please help thank you. I finished intalling Matlab through the linux terminal. I know the directory name is /usr/local/MATLAB/R2022b I just dont get how to find it. I used ‘cd /usr/local/MATLAB/R2022b’ which brings me into the directory, but I dont know where to go from there. Do I try to open a file under the directory? If so what file? I just need to know how to open Matlab after installing it. From what I have understood so far, I have to open it through the terminal. Please help thank you. installation MATLAB Answers — New Questions
Hey guys I have encountered the following error while trying to run my simulink block in external mode. How can I solve it
rtiostream_serial_daemon.cpp:(.text.rtIOStreamSend+0x10): undefined reference to `Print::write(unsigned char const*, unsigned int)’ collect2.exe: error: ld returned 1 exit status gmake[1]: *** [../blink_simulink.elf] Error 1 gmake[1]: Leaving directory `E:/OneDrive/Desktop/output/blink_simulink_ert_rtw’ gmake: *** [all] Error 2 The make command returned an error of 2 ### Build procedure for blink_simulink aborted due to an error.
Build Summary
Top model targets built: Model Action Rebuild Reason ==================== blink_simulink Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date) Build duration: 0h 5m 35.22srtiostream_serial_daemon.cpp:(.text.rtIOStreamSend+0x10): undefined reference to `Print::write(unsigned char const*, unsigned int)’ collect2.exe: error: ld returned 1 exit status gmake[1]: *** [../blink_simulink.elf] Error 1 gmake[1]: Leaving directory `E:/OneDrive/Desktop/output/blink_simulink_ert_rtw’ gmake: *** [all] Error 2 The make command returned an error of 2 ### Build procedure for blink_simulink aborted due to an error.
Build Summary
Top model targets built: Model Action Rebuild Reason ==================== blink_simulink Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date) Build duration: 0h 5m 35.22s rtiostream_serial_daemon.cpp:(.text.rtIOStreamSend+0x10): undefined reference to `Print::write(unsigned char const*, unsigned int)’ collect2.exe: error: ld returned 1 exit status gmake[1]: *** [../blink_simulink.elf] Error 1 gmake[1]: Leaving directory `E:/OneDrive/Desktop/output/blink_simulink_ert_rtw’ gmake: *** [all] Error 2 The make command returned an error of 2 ### Build procedure for blink_simulink aborted due to an error.
Build Summary
Top model targets built: Model Action Rebuild Reason ==================== blink_simulink Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date) Build duration: 0h 5m 35.22s simulink, external mode MATLAB Answers — New Questions
tx/rx example qspk adalm pluto problem not compiling
Hello, i am trying to use the example of the pluto rx/tx in simulink. i am pretty sure it worked a few days ago.
But now when i start it i get this error:
Where it does not know where the workspace is, and then when i select it just crashes.
Or the other error i did get which i can not remember but something about receiver got overloaded while running.
But i am pretty sure if i can reset the examples it will work, but i already tried to uninstall and then install. Or i am doing something wrong with the workspaces.
Already thanks i advance, i know this is bit vague.Hello, i am trying to use the example of the pluto rx/tx in simulink. i am pretty sure it worked a few days ago.
But now when i start it i get this error:
Where it does not know where the workspace is, and then when i select it just crashes.
Or the other error i did get which i can not remember but something about receiver got overloaded while running.
But i am pretty sure if i can reset the examples it will work, but i already tried to uninstall and then install. Or i am doing something wrong with the workspaces.
Already thanks i advance, i know this is bit vague. Hello, i am trying to use the example of the pluto rx/tx in simulink. i am pretty sure it worked a few days ago.
But now when i start it i get this error:
Where it does not know where the workspace is, and then when i select it just crashes.
Or the other error i did get which i can not remember but something about receiver got overloaded while running.
But i am pretty sure if i can reset the examples it will work, but i already tried to uninstall and then install. Or i am doing something wrong with the workspaces.
Already thanks i advance, i know this is bit vague. adalm pluto, receiver, tranceiver, example MATLAB Answers — New Questions
Panel VAR in BEAR app
I am running the panel VAR scenario in the BEAR app by ECB – Dynamic Structure Factor. However, even with the default data set for three units – US EA UK – the program stops working and says : "Something went wrong. Not enough input arguments".
What might be the reason behind? I need no structural identification, just a pure reduced-form estimates.I am running the panel VAR scenario in the BEAR app by ECB – Dynamic Structure Factor. However, even with the default data set for three units – US EA UK – the program stops working and says : "Something went wrong. Not enough input arguments".
What might be the reason behind? I need no structural identification, just a pure reduced-form estimates. I am running the panel VAR scenario in the BEAR app by ECB – Dynamic Structure Factor. However, even with the default data set for three units – US EA UK – the program stops working and says : "Something went wrong. Not enough input arguments".
What might be the reason behind? I need no structural identification, just a pure reduced-form estimates. bear app, panel var MATLAB Answers — New Questions
How do I copy a file to a clipboard using MATLAB?
How do I copy a file to a clipboard using MATLAB, just like using the shortcut Ctrl+C in a Windows system. Thanks!How do I copy a file to a clipboard using MATLAB, just like using the shortcut Ctrl+C in a Windows system. Thanks! How do I copy a file to a clipboard using MATLAB, just like using the shortcut Ctrl+C in a Windows system. Thanks! clipboard, windows MATLAB Answers — New Questions
How to make the encircled curve by blue.
How to make the encircled curve by blue.
clear all
format long
set(0,’DefaultAxesFontSize’,20);
figure;
load(‘H_LC(2).mat’);
dim=2; %number of variables of my system which are x and y
MMM=max(x(1:dim:end-2,:));
plot(x(end,:),MMM,’r’, ‘LineWidth’,2); % RED
hold on
load(‘H_LC(2).mat’);
M=min(x(1:dim:end-2,:)); % end-2 excludes the parameter and the period from the continuation variable x
plot(x(end,:),M,’r’, ‘LineWidth’,2);
hold on
xlabel(‘$aa$’,’FontSize’,20,’interpreter’,’latex’,’FontWeight’,’normal’,’Color’,’k’);
ylabel(‘$bb$’,’FontSize’,20,’interpreter’,’latex’,’FontWeight’,’normal’,’Color’,’k’);
hold on
axis([.1142595 .1142604 .5295 .5297]);How to make the encircled curve by blue.
clear all
format long
set(0,’DefaultAxesFontSize’,20);
figure;
load(‘H_LC(2).mat’);
dim=2; %number of variables of my system which are x and y
MMM=max(x(1:dim:end-2,:));
plot(x(end,:),MMM,’r’, ‘LineWidth’,2); % RED
hold on
load(‘H_LC(2).mat’);
M=min(x(1:dim:end-2,:)); % end-2 excludes the parameter and the period from the continuation variable x
plot(x(end,:),M,’r’, ‘LineWidth’,2);
hold on
xlabel(‘$aa$’,’FontSize’,20,’interpreter’,’latex’,’FontWeight’,’normal’,’Color’,’k’);
ylabel(‘$bb$’,’FontSize’,20,’interpreter’,’latex’,’FontWeight’,’normal’,’Color’,’k’);
hold on
axis([.1142595 .1142604 .5295 .5297]); How to make the encircled curve by blue.
clear all
format long
set(0,’DefaultAxesFontSize’,20);
figure;
load(‘H_LC(2).mat’);
dim=2; %number of variables of my system which are x and y
MMM=max(x(1:dim:end-2,:));
plot(x(end,:),MMM,’r’, ‘LineWidth’,2); % RED
hold on
load(‘H_LC(2).mat’);
M=min(x(1:dim:end-2,:)); % end-2 excludes the parameter and the period from the continuation variable x
plot(x(end,:),M,’r’, ‘LineWidth’,2);
hold on
xlabel(‘$aa$’,’FontSize’,20,’interpreter’,’latex’,’FontWeight’,’normal’,’Color’,’k’);
ylabel(‘$bb$’,’FontSize’,20,’interpreter’,’latex’,’FontWeight’,’normal’,’Color’,’k’);
hold on
axis([.1142595 .1142604 .5295 .5297]); plot MATLAB Answers — New Questions
Six phase PMSM FEM pamarametrized model block
Hello, I would like to know if it is possible to use the simscape electrical ‘FEM-Parameterized PMSM’ block to model a six phase PMSM using flux data and loss map. In particular, I saw that it is possible to set ‘winding type -> open end’ to obtain 6 electrical ports to the block. Do these ports actually represent the 6 distinct phases? If so, how should I handle the neutral points?
Here is a picture of the block in questionHello, I would like to know if it is possible to use the simscape electrical ‘FEM-Parameterized PMSM’ block to model a six phase PMSM using flux data and loss map. In particular, I saw that it is possible to set ‘winding type -> open end’ to obtain 6 electrical ports to the block. Do these ports actually represent the 6 distinct phases? If so, how should I handle the neutral points?
Here is a picture of the block in question Hello, I would like to know if it is possible to use the simscape electrical ‘FEM-Parameterized PMSM’ block to model a six phase PMSM using flux data and loss map. In particular, I saw that it is possible to set ‘winding type -> open end’ to obtain 6 electrical ports to the block. Do these ports actually represent the 6 distinct phases? If so, how should I handle the neutral points?
Here is a picture of the block in question motor, permanent_motor, six_phase, fem_parametrized MATLAB Answers — New Questions
How can I simulate Pulse Radar and Antenna Design in Matlab?
Model the jamming system of the EH Self Protection System in a fighter aircraft with an RCS of 10 m2 and 4 different pulsed threat radars with operating frequencies varying in the range of 8-12 GHz. Design the antenna for the mixer separately in the MATLAB application and use the pattern of this antenna in the simulation. Detection of J/S and fighter for 2 different strengths of interference made by EH Self Protection System for each radar. Perform a MATLAB simulation where the burn-through distance is calculated.Model the jamming system of the EH Self Protection System in a fighter aircraft with an RCS of 10 m2 and 4 different pulsed threat radars with operating frequencies varying in the range of 8-12 GHz. Design the antenna for the mixer separately in the MATLAB application and use the pattern of this antenna in the simulation. Detection of J/S and fighter for 2 different strengths of interference made by EH Self Protection System for each radar. Perform a MATLAB simulation where the burn-through distance is calculated. Model the jamming system of the EH Self Protection System in a fighter aircraft with an RCS of 10 m2 and 4 different pulsed threat radars with operating frequencies varying in the range of 8-12 GHz. Design the antenna for the mixer separately in the MATLAB application and use the pattern of this antenna in the simulation. Detection of J/S and fighter for 2 different strengths of interference made by EH Self Protection System for each radar. Perform a MATLAB simulation where the burn-through distance is calculated. radar, antenna design, pulsed threat radar, rcs MATLAB Answers — New Questions
Not receiving correct FSK modulated signal [N210 USRP]
I have set up two N210 USRPs to transmit/receive simple FSK modulated signals. My code is very similar to the examples in the documentation (https://se.mathworks.com/help/supportpkg/usrpradio/ug/comm.sdrutransmitter-system-object.html and https://se.mathworks.com/help/supportpkg/usrpradio/ug/comm.sdrureceiver-system-object.html) but for the different modulation approach. The two USRPs are connected to two separate computers. One runs a script to repeatedly transmit my signal while the other runs a script to repeatedly scan for a received signal, which it then demodulates and returns to the user. Unfortunately, the received and demodulated signal does not resemble the transmitted signal at all.
I have experimented with different antennas, different gains and different centre frequencies.
What could possibly be causing this?
Transmitter code:
% Message
barkerCode = [1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0]’;
message = ones(20, 1);
frame = [barkerCode; message];
% Modulation
H = comm.FSKModulator(‘ModulationOrder’, 2);
messageIQ = H(frame);
% Transmitter
center_frequency = 434e6;
gain = 30;
radio = comm.SDRuTransmitter(…
‘Platform’, ‘N200/N210/USRP2’, …
‘IPAddress’, ‘192.168.10.2’, …
‘CenterFrequency’, center_frequency, …
‘Gain’, gain);
% Transmit
fprintf(‘Transmitting now…n’)
stop = 1000;
i = 0;
while i < stop
underrun = radio(messageIQ);
if (underrun ~= 0)
fprintf(‘Iteration: %i, underrun: %in’, i, underrun);
end
i = i + 1;
end
fprintf(‘Donen’)
release(radio)
Receiver code:
% Radio
center_frequency = 434e6;
gain = 30;
radio = comm.SDRuReceiver(…
‘Platform’, ‘N200/N210/USRP2’, …
‘IPAddress’, ‘192.168.10.2’, …
‘CenterFrequency’, center_frequency, …
‘Gain’, gain);
% Demodulator
D = comm.FSKDemodulator(‘ModulationOrder’, 2);
% Receive signal
len = 0;
while len == 0
[rcvdSignal, len] = step(radio);
demodSignal = D(rcvdSignal);
end
plot(debudSignal);I have set up two N210 USRPs to transmit/receive simple FSK modulated signals. My code is very similar to the examples in the documentation (https://se.mathworks.com/help/supportpkg/usrpradio/ug/comm.sdrutransmitter-system-object.html and https://se.mathworks.com/help/supportpkg/usrpradio/ug/comm.sdrureceiver-system-object.html) but for the different modulation approach. The two USRPs are connected to two separate computers. One runs a script to repeatedly transmit my signal while the other runs a script to repeatedly scan for a received signal, which it then demodulates and returns to the user. Unfortunately, the received and demodulated signal does not resemble the transmitted signal at all.
I have experimented with different antennas, different gains and different centre frequencies.
What could possibly be causing this?
Transmitter code:
% Message
barkerCode = [1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0]’;
message = ones(20, 1);
frame = [barkerCode; message];
% Modulation
H = comm.FSKModulator(‘ModulationOrder’, 2);
messageIQ = H(frame);
% Transmitter
center_frequency = 434e6;
gain = 30;
radio = comm.SDRuTransmitter(…
‘Platform’, ‘N200/N210/USRP2’, …
‘IPAddress’, ‘192.168.10.2’, …
‘CenterFrequency’, center_frequency, …
‘Gain’, gain);
% Transmit
fprintf(‘Transmitting now…n’)
stop = 1000;
i = 0;
while i < stop
underrun = radio(messageIQ);
if (underrun ~= 0)
fprintf(‘Iteration: %i, underrun: %in’, i, underrun);
end
i = i + 1;
end
fprintf(‘Donen’)
release(radio)
Receiver code:
% Radio
center_frequency = 434e6;
gain = 30;
radio = comm.SDRuReceiver(…
‘Platform’, ‘N200/N210/USRP2’, …
‘IPAddress’, ‘192.168.10.2’, …
‘CenterFrequency’, center_frequency, …
‘Gain’, gain);
% Demodulator
D = comm.FSKDemodulator(‘ModulationOrder’, 2);
% Receive signal
len = 0;
while len == 0
[rcvdSignal, len] = step(radio);
demodSignal = D(rcvdSignal);
end
plot(debudSignal); I have set up two N210 USRPs to transmit/receive simple FSK modulated signals. My code is very similar to the examples in the documentation (https://se.mathworks.com/help/supportpkg/usrpradio/ug/comm.sdrutransmitter-system-object.html and https://se.mathworks.com/help/supportpkg/usrpradio/ug/comm.sdrureceiver-system-object.html) but for the different modulation approach. The two USRPs are connected to two separate computers. One runs a script to repeatedly transmit my signal while the other runs a script to repeatedly scan for a received signal, which it then demodulates and returns to the user. Unfortunately, the received and demodulated signal does not resemble the transmitted signal at all.
I have experimented with different antennas, different gains and different centre frequencies.
What could possibly be causing this?
Transmitter code:
% Message
barkerCode = [1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0]’;
message = ones(20, 1);
frame = [barkerCode; message];
% Modulation
H = comm.FSKModulator(‘ModulationOrder’, 2);
messageIQ = H(frame);
% Transmitter
center_frequency = 434e6;
gain = 30;
radio = comm.SDRuTransmitter(…
‘Platform’, ‘N200/N210/USRP2’, …
‘IPAddress’, ‘192.168.10.2’, …
‘CenterFrequency’, center_frequency, …
‘Gain’, gain);
% Transmit
fprintf(‘Transmitting now…n’)
stop = 1000;
i = 0;
while i < stop
underrun = radio(messageIQ);
if (underrun ~= 0)
fprintf(‘Iteration: %i, underrun: %in’, i, underrun);
end
i = i + 1;
end
fprintf(‘Donen’)
release(radio)
Receiver code:
% Radio
center_frequency = 434e6;
gain = 30;
radio = comm.SDRuReceiver(…
‘Platform’, ‘N200/N210/USRP2’, …
‘IPAddress’, ‘192.168.10.2’, …
‘CenterFrequency’, center_frequency, …
‘Gain’, gain);
% Demodulator
D = comm.FSKDemodulator(‘ModulationOrder’, 2);
% Receive signal
len = 0;
while len == 0
[rcvdSignal, len] = step(radio);
demodSignal = D(rcvdSignal);
end
plot(debudSignal); usrp, communications toolbox support package, n210 MATLAB Answers — New Questions
contour plots on a given geometry – finite element
I have some values of stretch that I need to assign to a given set of elements and then I want to show a contour plot of those values on the geometry that I get by plotting the elements through the nodes. How can I do?I have some values of stretch that I need to assign to a given set of elements and then I want to show a contour plot of those values on the geometry that I get by plotting the elements through the nodes. How can I do? I have some values of stretch that I need to assign to a given set of elements and then I want to show a contour plot of those values on the geometry that I get by plotting the elements through the nodes. How can I do? contour plot, plotting, finite element, stretch MATLAB Answers — New Questions
How to solve a system of nonlinear differential equation that follows some pattern
I have a system of nonlinear differential equation that follows some patter, for example . I could solve for some small . I want to solve it for . Is there any way to do that or we can tonly type manually. Is it possible to use loops in function environment to solve such cases? Thank you!I have a system of nonlinear differential equation that follows some patter, for example . I could solve for some small . I want to solve it for . Is there any way to do that or we can tonly type manually. Is it possible to use loops in function environment to solve such cases? Thank you! I have a system of nonlinear differential equation that follows some patter, for example . I could solve for some small . I want to solve it for . Is there any way to do that or we can tonly type manually. Is it possible to use loops in function environment to solve such cases? Thank you! differential equations MATLAB Answers — New Questions
Stackedplot error when changing position and plotting again
Hello together,
I get an error with stackedplot, when changing position (which works always the first time) and plotting then again, adding new variables. Without the position change, there is no error and I can plot on.
That’s the code I use. Without the "Position" line it works fine all the time. With the position change I get an error (below code).
app.Logs(app.Log).Stack{1} = stackedplot(app.Logs(app.Log).Table, app.Logs(app.Log).ToPlot,’Parent’,app.StackedTab);
for e=1:+1:height(app.Logs(app.Log).Stack{1}.DisplayLabels)
emptyLabels(e,1) = ""; % Create empty string for label
end
if app.Logs(app.Log).Plots > 0
app.Logs(app.Log).Stack{1}.DisplayLabels = emptyLabels; % "Delete labels"
app.Logs(app.Log).Stack{1}.Position = [0.05,0.05,0.90,0.90]; % Get rid of the broad margin
end
Thats the error:
Error using stackedplot (line 100)
Brace indexing is not supported for variables of this type.
Error in LogReader/DataButtonPress (line 141)
app.Logs(app.Log).Stack{1} =
stackedplot(app.Logs(app.Log).Table,
app.Logs(app.Log).ToPlot,’Parent’,app.StackedTab);
Error in LogReader>@(varargin)app.DataButtonPress(varargin{:}) (line 336)
app.Logs(app.Log).Variables{2, i}.ValueChangedFcn =
@app.DataButtonPress; %Callback function
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 429)
Error while evaluating StateButton PrivateValueChangedFcn.
What am I not understanding? ^^
Thanks in advance!
ChristofHello together,
I get an error with stackedplot, when changing position (which works always the first time) and plotting then again, adding new variables. Without the position change, there is no error and I can plot on.
That’s the code I use. Without the "Position" line it works fine all the time. With the position change I get an error (below code).
app.Logs(app.Log).Stack{1} = stackedplot(app.Logs(app.Log).Table, app.Logs(app.Log).ToPlot,’Parent’,app.StackedTab);
for e=1:+1:height(app.Logs(app.Log).Stack{1}.DisplayLabels)
emptyLabels(e,1) = ""; % Create empty string for label
end
if app.Logs(app.Log).Plots > 0
app.Logs(app.Log).Stack{1}.DisplayLabels = emptyLabels; % "Delete labels"
app.Logs(app.Log).Stack{1}.Position = [0.05,0.05,0.90,0.90]; % Get rid of the broad margin
end
Thats the error:
Error using stackedplot (line 100)
Brace indexing is not supported for variables of this type.
Error in LogReader/DataButtonPress (line 141)
app.Logs(app.Log).Stack{1} =
stackedplot(app.Logs(app.Log).Table,
app.Logs(app.Log).ToPlot,’Parent’,app.StackedTab);
Error in LogReader>@(varargin)app.DataButtonPress(varargin{:}) (line 336)
app.Logs(app.Log).Variables{2, i}.ValueChangedFcn =
@app.DataButtonPress; %Callback function
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 429)
Error while evaluating StateButton PrivateValueChangedFcn.
What am I not understanding? ^^
Thanks in advance!
Christof Hello together,
I get an error with stackedplot, when changing position (which works always the first time) and plotting then again, adding new variables. Without the position change, there is no error and I can plot on.
That’s the code I use. Without the "Position" line it works fine all the time. With the position change I get an error (below code).
app.Logs(app.Log).Stack{1} = stackedplot(app.Logs(app.Log).Table, app.Logs(app.Log).ToPlot,’Parent’,app.StackedTab);
for e=1:+1:height(app.Logs(app.Log).Stack{1}.DisplayLabels)
emptyLabels(e,1) = ""; % Create empty string for label
end
if app.Logs(app.Log).Plots > 0
app.Logs(app.Log).Stack{1}.DisplayLabels = emptyLabels; % "Delete labels"
app.Logs(app.Log).Stack{1}.Position = [0.05,0.05,0.90,0.90]; % Get rid of the broad margin
end
Thats the error:
Error using stackedplot (line 100)
Brace indexing is not supported for variables of this type.
Error in LogReader/DataButtonPress (line 141)
app.Logs(app.Log).Stack{1} =
stackedplot(app.Logs(app.Log).Table,
app.Logs(app.Log).ToPlot,’Parent’,app.StackedTab);
Error in LogReader>@(varargin)app.DataButtonPress(varargin{:}) (line 336)
app.Logs(app.Log).Variables{2, i}.ValueChangedFcn =
@app.DataButtonPress; %Callback function
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 429)
Error while evaluating StateButton PrivateValueChangedFcn.
What am I not understanding? ^^
Thanks in advance!
Christof stackedplot position MATLAB Answers — New Questions