How can I plot this state space like the graph I attached by using tf() and step() command? Thank you! I2/E0=1/(s^3+s^2+3*s+1) NOTE:- Matlabsolutions.com provide latest MatLab Homework Help, MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. Try these codes below please; clc; clear; close all; numerator = 1; denominator = [1,1,3,1]; sys = tf(numerator,denominator); yyaxis left SEE COMPLETE ANSWER CLICK THE LINK https://www.matlabsolutions.com/resources/how-to-plot-transfer-functions-in-matlab-.php
Greetings everyone. I want to use scalingLayer to shift my actor network's outputs to desired range. I'm using this reference and the code below :
numObs = 10; numAct = 5; actorLayerSizes = [400 300]; sc = reshape([10, 10, 20, 15, 15], [1 1 5]); bias = reshape([0, 0, 0, 0, 0], [1 1 5]); actorNetwork = [ imageInputLayer([numObs 1 1],'Normalization','none','Name','observation') fullyConnectedLayer(actorLayerSizes(1), 'Name', 'ActorFC1') reluLayer('Name', 'ActorRelu1') fullyConnectedLayer(actorLayerSizes(2), 'Name', 'ActorFC2') reluLayer('Name', 'ActorRelu2') fullyConnectedLayer(numAct, 'Name', 'ActorFC3') tanhLayer('Name','ActorTanh1'), ... scalingLayer('Scale',sc, 'Bias',bias) ];
I'm getting the error below:
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
Can anyone help me with this?
ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
The way you have it now, you are adding the scaling layer in the same row as tanh whereas it should be in its own row. actorNetwork = [
imageInputLayer([numObs 1 1],'Normalization','none','Name','observation')
fullyConnectedLayer(actorLayerSizes(1), 'Name', 'ActorFC1')
reluLayer('Name', 'ActorRelu1')
fullyConnectedLayer(actorLayerSizes(2), 'Name', 'ActorFC2')
reluLayer('Name', 'ActorRelu2')
fullyConnectedLayer(numAct, 'Name', 'ActorFC3')
tanhLayer('Name','ActorTanh1')
scalingLayer('Scale',sc, 'Bias',bias)
];
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
The way you have it now, you are adding the scaling layer in the same row as tanh whereas it should be in its own row.
actorNetwork = [ imageInputLayer([numObs 1 1],'Normalization','none','Name','observation') fullyConnectedLayer(actorLayerSizes(1), 'Name', 'ActorFC1') reluLayer('Name', 'ActorRelu1') fullyConnectedLayer(actorLayerSizes(2), 'Name', 'ActorFC2') reluLayer('Name', 'ActorRelu2') fullyConnectedLayer(numAct, 'Name', 'ActorFC3') tanhLayer('Name','ActorTanh1') scalingLayer('Scale',sc, 'Bias',bias) ];
Comments
Post a Comment