https://se.mathworks.com/matlabcentral/answers/questionsMATLAB Answers — New Questions2019-04-21T02:32:51Ztag:se.mathworks.com,2005:Question/4576092019-04-21T02:32:51Z2019-04-21T02:32:51ZWhy is the last simulation value is "0",i can't find where is wrongI write an error probability of anti-podal,however,i found the last simulation value is zero,it means that there is no any error signal in the receiver at that time,but that is possible,and i can't find where do i wrong,can anyone help me?
Code
T_s=10^4;
SNR_dB=[-3 0 3 6 9];
SNR_Watt=10.^(SNR_dB./10);
anti_signal=rand(1,T_s)
%Create the anti-podal signal
for ii=1:length(SNR_dB)
for t=1:T_s
if anti_signal(t)>0.5
anti_signal(t)=1;
else
anti_signal(t)=-1;
end
end
%AWGN noise
noise=(1/sqrt(2)*[randn(1,T_s)+1i*randn(1,T_s)]);
%receive_signal
%10.^(-SNR_dB(ii)/20)*noise is the noise in "x" SNR,like -3dB,0dB,3dB,6dB and 9dB
receive_signal=anti_signal+10.^(-SNR_dB(ii)/20)*noise;
for q=1:T_s
if receive_signal(q)>0
receive_signal(q)=1;
else
receive_signal(q)=-1;
end
end
simulation(ii)=(T_s-sum(anti_signal==receive_signal))/T_s%(Total number-the number which is right)-Total number
end
theoretical=1/2*erfc(sqrt(SNR_Watt));
semilogy(SNR_dB,simulation,SNR_dB,theoretical)
The simulation result is as below,as we can see,the last number is always "0",why?i think there is something wrong in the code,but if this 0 is correct,i can't find a reasonable reason to convince to me
yang-En Hsiaohttps://se.mathworks.com/matlabcentral/profile/authors/13220840-yang-en-hsiaotag:se.mathworks.com,2005:Question/4575052019-04-20T09:05:42Z2019-04-21T02:31:36ZFind cell and return index Hi everyone,
a = { {21 3 1}, {22 32 2}, {21 31 2}, {22 32 1} };
I would like to know the locations of the cells containing a specific value- {21 31 1}
In this case, it's 1.
I try to use like below:
Match = {21 31 1};
CorrectMatch = find (cellfun(@(x) isequal (x,Match), a(1,:)));
but it doesn't work out
Could any one help me?
Ting-Yu Chuehhttps://se.mathworks.com/matlabcentral/profile/authors/14644923-ting-yu-chuehtag:se.mathworks.com,2005:Question/4576082019-04-21T02:29:45Z2019-04-21T02:29:45Z¿Como puedo traspasar esta serie a una funcion?8fac = 1;
n=input('favor ingresar cantidadd e terminos: ');
x=input('Ingresar el valor de x: ');
s=x;
for i=2:n
fac = fac * ((i*2)-1);
if(mod(i,2)== 0)
s=1 - double((x^(i*2))/fac
else
s=1 + double((x^(i*2))/fac
end
end
disp('el valor de Cos(x) se aproxima a: ');
Es una serie del cos(x)Thomas Bustoshttps://se.mathworks.com/matlabcentral/profile/authors/12620250-thomas-bustostag:se.mathworks.com,2005:Question/4576072019-04-21T02:29:13Z2019-04-21T02:29:13ZHow can I present a 3D particle with cube mesh? Hi,
I want to draw a spherical particle whick is made of small cubes in MALTAB. I can define the coordinate of each cube inside the particle, however, do not know how to show (or define) each mesh as a cube. Thank you in advance for your help.
Masoud Shabani nezhad navroodhttps://se.mathworks.com/matlabcentral/profile/authors/10447316-masoud-shabani-nezhad-navroodtag:se.mathworks.com,2005:Question/4575412019-04-20T14:56:34Z2019-04-21T02:25:55Zregexrep for the neophyteHow to write expression to find and convert financial strings written with comma separator to be able to parse numerically?
Example stirng is something like:
recipients={'John Doe $200, Freddy Flint $132.40 SP19; Mary Lamb $1,423.00-SP19, Joe Blow $1,200'};
which is a list of student scholarship awards entered, unfortunately, free-style in a remarks field in an Excel spreadsheet. I need to parse by student and extract each.
I managed to find/return the location/token of the amounts containing the punctuation, but I'm illiterate with regexp and haven't figured out how to locate the comma then within that substring to remove it.
K>> regexp(recipients,'([$]\d+[,]\d+)','match')
ans =
1×1 cell array
{1×2 cell}
K>> ans{:}
ans =
1×2 cell array
{'$1,423'} {'$1,200'}
K>>
As can be seen, the original text also has "issues" in that the separator between students isn't consistent--it may be a comma or semicolon, not sure what else I'll find as I progress.
For context, this is the next step past the previous Q? of piecing back together disparate databases/spreadsheets...now that I can compare the award to the billing by account, I can find coding or other errors--but need to be able compare the details.
dpbhttps://se.mathworks.com/matlabcentral/profile/authors/28872-dpbtag:se.mathworks.com,2005:Question/4575742019-04-20T20:13:56Z2019-04-21T02:23:32ZHow to delete a column from a TimeSeries?Hello,
I would like to know how to delete a column from a TimeSeries.
I need to plot two curves in the same figure but different y-axis. First: time vs temperature; second: time vs level.
I got the temperature from a TimeSeries matrix called MyTimeSeries, whereas the level is in a datetime array. Unfortunatelly, when I try the code below, an error* appears in the add axis function.
plot(MyTimeSeries.Time, MyTimeSeries.Data(:,1)); hold on
addaxis(Time,Level);
So i use the follow code. However, it also plots data (:,2), (:,3), etc, and I need only Data(:,1). That's why I need to delete the other columns.
plot(MyTimeSeries); hold on
addaxis(Time,Level);
Well, I had tried to convert MyTimeSeries.Time and MyTimeSeries.Data to datetime values, but when I do it, the matrix is very strange, with strange numbers instead of time.
I also tried to convert Time and Level to a TimeSeries format, but when I do it, another error** appears, since some values in "Level" are N/A (because this is the way my controller works, it applies N/A for some conditions).
MyTimeSeries.Time format: '29-Mar-2019 09:40:15'
================================================================================
*Error:
Error using aa_splot (line 24)
Data inputs must match the axis configuration. A numeric axis must have numeric
data inputs or data inputs which can be converted to double.
Error in addaxis (line 135)
hplts = aa_splot(varargin{:});
**Other error:
Error using timeseries.tsChkTime (line 572)
Time vector must contain only finite values.
Error in timeseries/init (line 286)
time = timeseries.tsChkTime(time);
Error in timeseries (line 343)
this = init(this,varargin{:});Marlon Saveri Silvahttps://se.mathworks.com/matlabcentral/profile/authors/6314509-marlon-saveri-silvatag:se.mathworks.com,2005:Question/4576062019-04-21T02:21:46Z2019-04-21T02:22:29Zdifferent font sizes for y labelsHello,
I want to have different font sizes for y-labels. for example in this simple plot, I want to have -2 and 2 in y-axis in font 16 and the rest in font 12:
x = -1:0.01:1;
y = 3*asin(x);
plot(x,y)
set(gca,'Ytick',[-4, -2, 0, 2, 4])Hamidhttps://se.mathworks.com/matlabcentral/profile/authors/8477485-hamidtag:se.mathworks.com,2005:Question/4575822019-04-20T21:10:51Z2019-04-21T02:14:43ZConverting user input char to an array As part of my university matlab module i was assigned to do an assigment from one of 4 options. I'm on a bit of a road block, part of code is requesting the user to type in 6 numbers for a lottery game, being that this data is recorded as a char i want to convert this to a numerial array (matrix). I have tried the following with no luck.
player_numbers = input ('Please enter your number: ','s');
player_lotto_numbers = str2num(player_numbers);
Mehmet Saglamhttps://se.mathworks.com/matlabcentral/profile/authors/12224026-mehmet-saglamtag:se.mathworks.com,2005:Question/4573612019-04-19T12:04:10Z2019-04-21T02:08:56ZHow can I install mosek in matlab for free?How can I install mosek in matlab for free?Karry Mahttps://se.mathworks.com/matlabcentral/profile/authors/15283432-karry-matag:se.mathworks.com,2005:Question/4576052019-04-21T02:08:05Z2019-04-21T02:08:05ZFor an nx3 matrix, filter out the rows with a maximum 3rd column when the first and second are the sameFor a matrix such as:
mat=[0 0 0
1 1 2
1 1 3
1 1 5
2 1 6
3 3 2
3 3 1]
Is there a way to filter this matrix to obtain the following matrix
final=[0 0 0
1 1 5
2 1 6
3 3 2]
Appreciate any help thanksJoseph Maloneyhttps://se.mathworks.com/matlabcentral/profile/authors/13297175-joseph-maloneytag:se.mathworks.com,2005:Question/4576042019-04-21T02:07:13Z2019-04-21T02:07:13ZHow can I use 'yalmip' to solve the Quadratic stability range of uncertain model in control system?How can I solve the value '0.6812' by using 'yalmip' or 'LMI'?I would appreciate it if you could give me an example.Karry Mahttps://se.mathworks.com/matlabcentral/profile/authors/15283432-karry-matag:se.mathworks.com,2005:Question/4576032019-04-21T01:58:50Z2019-04-21T01:58:50Zvariable nonlinear spring & damperI could not find 'variable nonlinear spring or damper' in the Simulink component. Is there any way to chane fixed value nonlinear spring/damper to variable nonlinear spring /damper? harsh vardhanhttps://se.mathworks.com/matlabcentral/profile/authors/12263913-harsh-vardhantag:se.mathworks.com,2005:Question/4573772019-04-19T13:35:12Z2019-04-21T01:56:17ZHow to check Excel sheet data of one with Excel sheet data of another on matlab and print the output on another Excel sheetSo,
I'm reading a list of flights data from an excel sheet called plot:
journeys = readtable('plot.xlsx');
And I have an ATS route givwen by lat10 and lon10:
lat10 = [12.9933,19.0852]; lon10 = [80.1705,72.8752];
I'm reading the flight data and selecting them based on groups (flight numbers) of flights that have 80% of their data within the ats route:
[x10, y10]= mfwdtran(mstruct,lat10,lon10);
X = [x10,fliplr(x10)];
Y = [y10,fliplr(y10)-d];
%Y = [y10,fliplr(y10)-d];
plot(x10,y10,'-','color','m');%plotting ats
hold on;
plot(x10,y10-d,'-','color','m');%only for 2nd and 3rd batch
%plot(x10-d,y10,'-','color','m');%only for first batch
hold on;
%selecting flights--------------
[journeys.x, journeys.y] = mfwdtran(mstruct, journeys.latitude, journeys.longitude); %transform the flights latitude and longitude
in = inpolygon(journeys.x, journeys.y, X, Y);
[groupid, flights] = findgroups(journeys.flight); %assign unique id to each flight and apply to rows of the table
inratio = splitapply(@(in)nnz(in)/numel(in), in, groupid); %ratio of points in polygon to points in flight
selectedflights = flights(inratio >= .8); %for flights that have 70% of their journey in the polygon
% isallin = splitapply(@all, in, groupid); %are ALL points of the flight in the polygon? logical output
% selectedflights = flights(isallin); %list of flights where all points are in the polygon
selectedjourneys = journeys(ismember(journeys.flight, selectedflights), :); %portion of the table with only the selected flights.
%selecting flights--------------
Now, I have a list of ATS routes in an excel sheet called ATS and I want to compare each flight data with each route that they correspond to. If a flight has 80% of its data within the route I want an excel sheet called Match to have the flight number and the ATS route it matches with.
I'm stuck with this problem from a long time now... kindly help please...
I have attached the excel sheets here.harman bhavejahttps://se.mathworks.com/matlabcentral/profile/authors/15243328-harman-bhavejatag:se.mathworks.com,2005:Question/4576022019-04-21T01:51:10Z2019-04-21T01:51:10Zhow do create test label?hai...i tried to run the kNN matlab code;
function [acc,score]=kNN(train,trainlabel,test,testlabel,k)
%train,trainlabel,test,testlabel
%return "accuravy rate"
N_tr=size(train,1);
N_ts=size(test,1);
Answer=zeros(N_ts,1);
for i=1:N_ts
% calc distance^2 between all train data and a test data
Temp=train-ones(N_tr,1)*test(i,:);
Distance2=sum(Temp.^2,2);
% [MIN I]=min(Distance2);
% Answer(i)=trainlabel(I);
neibors=sortrows([Distance2,trainlabel],1);
Answer(i)=mode(neibors(1:min(k,size(neibors,1)),2));
end
%[ANS testlabel];
acc=(1-nnz(Answer-testlabel)/N_ts)*100;
score=(Answer-testlabel==0);
how do i create the train label?(please see my 'DATA.txt' attachment).
my DATA.txt contains 5 X 10 matrix. each row represent class1~class5. EDWARD IJAU PELIAS POGhttps://se.mathworks.com/matlabcentral/profile/authors/15025257-edward-ijau-pelias-pogtag:se.mathworks.com,2005:Question/4573692019-04-19T13:13:16Z2019-04-21T01:47:37ZHow to draw equally sized squaresHi,
I draw a circle of radius 1, and I want to draw eqaully sized squares in the background of the circle. Kindly some one help,
r = 1. 0;
th = linspace(0,2*pi) ;
x = r*cos(th) ;
y = r*sin(th) ;
patch(x,y,rand(1,3)) ; % I am using random color in patch here.
axis equal
Now I want draw 10x10 squares as a background to the circle (the dia of each square is (2*r/10)). Mekala balajihttps://se.mathworks.com/matlabcentral/profile/authors/5786945-mekala-balajitag:se.mathworks.com,2005:Question/4575812019-04-20T21:03:20Z2019-04-21T01:44:14ZCalling option from menu functionThe code has main menu based on ATM macine. 1-Get cash. 2-Get Balance. 3-Quit % if user choose option 1
Mainmenu= menu('Main Menu','1-Get Cash','2-Get Balance','3-Quit');
if Mainmenu ==1
In Get Cash, Another menu that the user have to choose how much to withdraw
GetCashM= menu('Withdrawal amount','20$','40$','100$','200$');
, and after that, another menu to prompt the user to select 1- checking, 2- savings,
Acct= menu('From which account','checking','Saving');
and disp how many 20 bills were dispansed that is after verifying if there are enough funds in the selected account. And when option 1 or 2 are processed, the main menu will show again. I got that done. But, If option 3- quit selected, display New checking Balance and New Saving Balance. But how can I subtract the withdraw amount from checking savings account since menu option are string I think. Even if I called it it would be 1 or 2 or 3 or 4 respectivly to withdraw amount menu.
(ex)
Sbal = 100;
if the user withdrew 20$ from Sbal . "in option 1 from whidraw amount "
"second iteration."
if MainMenu ==. 3 % if the user choose option quit after proseccing whidraw amount
NewSavBal = GetCashMenu - SBal;
but that did not do it since values inside menu were string.
Keep in mind that
If the user closes the menu rather than making a selection, warning message should bedisplayed and the user given 2 more chances to make a selection from that menu. If they still close the menu on the 3rd attempt, an error message should be displayed that says the program has been terminated.mat geekhttps://se.mathworks.com/matlabcentral/profile/authors/9600941-mat-geektag:se.mathworks.com,2005:Question/2806152016-04-23T18:42:53Z2019-04-21T01:27:30ZHow can I find poles and zeros of transfer function matrix ?I have a matrix of transfer funtion of MIMO system and i have to find its poles and zerosMuhammad Waleedhttps://se.mathworks.com/matlabcentral/profile/authors/8085997-muhammad-waleedtag:se.mathworks.com,2005:Question/4576002019-04-21T00:45:09Z2019-04-21T01:23:13ZCan you make a section of a GUI jump back to another?I'm currently making a GUI that essentially filters data based on different parameters and then graphs the answer.
This group of radio buttons changes the filtering parameters and thus changes the answer you get.
I was wondering if you can use the MATLAB GUI syntax to help aid in this process. Here's the code for the radiobutton callback. I want it to automatically branch back to the filter function part of the GUI without having the copy and paste the code again that makes it display. Is there any function/command that will essentially say "go back to this part of the GUI code"?
% --- Executes when selected object is changed in waveselection.
function waveselection_SelectionChangedFcn(hObject, eventdata, handles)
% hObject handle to the selected object in waveselection
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Changes the
switch(get(eventdata.NewValue,'Tag'));
case 'deltawave'
handles.filterFreqs = [1 5];
case 'alphawave'
handles.filterFreqs = [7 16];
case 'betawave'
handles.filterFreqs = [14 41];
case 'gammawave'
handles.filterFreqs = [29 101];
end
guidata(hObject, handles);%Updates handles structure
Thank you greatly for any and all help!Blair Armstronghttps://se.mathworks.com/matlabcentral/profile/authors/13338781-blair-armstrongtag:se.mathworks.com,2005:Question/4576012019-04-21T01:08:59Z2019-04-21T01:20:42ZCurve fitting (curve fitting tool)Is there a way to do multiple curve fittings on same window?Chanaka Navarathnahttps://se.mathworks.com/matlabcentral/profile/authors/14638173-chanaka-navarathnatag:se.mathworks.com,2005:Question/4575942019-04-20T22:46:27Z2019-04-21T00:31:47ZHow can I prevent MATLAB from changing certain initial conditions using ode15s?I am trying to solve a DAE system using ode15s.
Due to the structure of ode15s I have to input initial conditions for all variables, however using degrees of freedom analysis on the problem only the differential equations need initial conditions. Due to that, I obtained all of the initial conditions in another MATLAB script and input them in ode15s. As MATLAB converges, however, it's changing the initial conditions of the 2 differential equations (which are the only ones that need to remain constant, in order to solve the required physical problem).
Is there a way to ensure that certain initial conditions remain unchanged?
Is there a way to add inequality constraints on the outputs of ode15s?
Thank you.Georgios Pasiashttps://se.mathworks.com/matlabcentral/profile/authors/11127140-georgios-pasiastag:se.mathworks.com,2005:Question/3930262018-04-06T07:55:30Z2019-04-21T00:18:37ZHow to Code for "Artificial Flora (AF) Optimization Algorithm?"The *Artificial Flora (AF) Optimization Algorithm* has been proposed recently.
The authors wrote that they use MATLAB, but they did not publish the code.
Knowing that if there is an open access method that can code this method with MATLAB, it will make a big contribution to science.
It is very important to explicitly publish Matlab codes for the development of the method and the experimental results.
Algorithm of the method proposed by the authors:
<<http://www.mdpi.com/applsci/applsci-08-00329/article_deploy/html/images/applsci-08-00329-g002.png>>
You can access the paper and method algorithm in the following address.
<http://www.mdpi.com/2076-3417/8/3/329>
If there is anything that can help in the coding, I'm very happy. I am ready to make the contribution for coding the method with MATLAB.
Thank you very much. Yasin KAYAhttps://se.mathworks.com/matlabcentral/profile/authors/10058776-yasin-kayatag:se.mathworks.com,2005:Question/4575972019-04-20T23:10:47Z2019-04-21T00:12:08ZHow to use polyfit to get the difference out of two functions?Hi
I have two datasets (X,Y). For every value of Y that corresponds to a value of X.
I am thinking of applying a polyfit command to get the best curve fitting for the data, and as a result I will come up with a function (slope+intercept).
How do I find the difference between those two functions? What command do I apply to subtract Function A from Function B?
Stelios Fanourakishttps://se.mathworks.com/matlabcentral/profile/authors/10865530-stelios-fanourakistag:se.mathworks.com,2005:Question/4575882019-04-20T21:48:48Z2019-04-21T00:04:03ZHow to update nodes with the calculated distance weight ? without using Dijkstra functionI need to code for dijkstra algorithm (without using matlab built in function), can anyone please tell me how to code it ? further how to update weights of the visited nodes ?
Fariha Komalhttps://se.mathworks.com/matlabcentral/profile/authors/14913336-fariha-komaltag:se.mathworks.com,2005:Question/4575892019-04-20T21:56:28Z2019-04-21T00:00:51Zellipsoid with surf command?obviously there are some complex numbers because of root in this code, but how can we plot ellipsoid using functions in the library?
[x,y] = meshgrid(1:0.5:10,1:20);
z = sqrt((3-x.^2-y.^2)/4);
surf(x,y,z)Kuatra Patilhttps://se.mathworks.com/matlabcentral/profile/authors/15291254-kuatra-patiltag:se.mathworks.com,2005:Question/4575992019-04-20T23:47:43Z2019-04-21T00:00:31ZRadius of Curvature ArrayThe code generates radius of curvatures for three points(coordinates x1,y1 x2,y2 and x3,y3. However, i have a set of coordinates (77) in all, and I am trying to rewrite the code to loop through the coordinates and generate a radius of curvature for every three points within the set of 77, and store the result in another variable say R. I have not been able to do this and I need urgent help: See the radius of curvature code below that generates when radius of curvature for 3 points.
function lambda=mycurvature(xinput, yinput)
global xstar ystar;
xstar=xinput;ystar=yinput;
alpha=atan2(ystar(2)-ystar(1),xstar(2)-xstar(1))-atan2(ystar(3)-ystar(2),xstar(3)-xstar(2));
if abs(alpha)<0.002; %set the curvature to 0 if the points are aligned
R=inf; lambda=0;
%plot(xstar,ystar,'-r',xstar,ystar,'*b','linewidth',2,'markersize',10);
else
initialguess = [1; 1; 1]; % Make a starting guess at the solution
options=optimset('Display','none'); % Option to display output
res = fsolve(@userfun,initialguess,options); % Call optimizer
x0=res(1);y0=res(2);R=res(3); %x-coord of center; y-coord of center; radius of curvature
lambda=1/R; %curvature
%t=0:0.01:2*pi;xx=x0+R*cos(t);yy=y0+R*sin(t);
%plot(xx,yy,'-r',xstar,ystar,'*b','linewidth',2,'markersize',10);
end
%str=sprintf('radius=%6.3f, curvature=%6.3f',R,lambda);
%title(str, 'fontsize', 14);xlabel('x'),ylabel('y');
%axis equal;
function F = userfun(vars)
global xstar ystar;
F = [...
(xstar(1)-vars(1))^2+(ystar(1)-vars(2))^2-(vars(3))^2; ...
(xstar(2)-vars(1))^2+(ystar(2)-vars(2))^2-(vars(3))^2; ...
(xstar(3)-vars(1))^2+(ystar(3)-vars(2))^2-(vars(3))^2; ...
];
xinput are the array of x coordinates for the three points, yinput are the array of y coordinates for the 3 points.
What i am doing that is not working is
x = [array of my x-coordinates of my 77 points]; y =[array of my y-coordinates of my 77 points]
for i = 1:3:length(x)-1
xinput = x(i), x(i+1), x(i+2)
yinput = y(i), y(i+1), y(i+2)
and then removed the function at the first line of code for the radius of curvature code above. This did not work. What am I doing wrong? Please help.Jide Williamshttps://se.mathworks.com/matlabcentral/profile/authors/13528121-jide-williamstag:se.mathworks.com,2005:Question/4575912019-04-20T22:06:54Z2019-04-20T23:59:42ZHow can i coding binary array using RNA codingHello every one
pls if any one know .
How can i coding binary array using RNA codingRNA coding?
ammar mohammedhttps://se.mathworks.com/matlabcentral/profile/authors/14858931-ammar-mohammedtag:se.mathworks.com,2005:Question/4575922019-04-20T22:15:40Z2019-04-20T23:58:52ZHow canI i generate chaotic map 3 Dimension and convert it into hexadecimal ?Hello every one
I want code of How can I generate chaotic map 3 Dimension and convert it into hexadecimal ?
pls If anyone can help me
Aliammar mohammedhttps://se.mathworks.com/matlabcentral/profile/authors/14858931-ammar-mohammedtag:se.mathworks.com,2005:Question/4575962019-04-20T22:51:51Z2019-04-20T23:56:06ZWrite a MATLAB® Write a MATLAB® script to graph the variable (𝒚) vs. the variable (𝒙). . [2 Pts] 𝒚 = 𝟎. 𝟒 √𝟏. 𝟖 𝒙 for 𝟎 ≤ 𝒙 ≤ 𝟑𝟓Pamela Aquinohttps://se.mathworks.com/matlabcentral/profile/authors/15290678-pamela-aquinotag:se.mathworks.com,2005:Question/4575982019-04-20T23:38:52Z2019-04-20T23:55:09ZWon't Plot in 3D%-----------------------------------------------------------------
%.... Name:Ariana Garcia
%.... Date:April 21,2017
%.... Project:CP4
%.... Recitation Section:Mon
%-----------------------------------------------------------------
%-----------------------------------------------------------------
%....
%.... Truss Analysis
%....
%-----------------------------------------------------------------
%***** READ THIS *****
% You must modify this code so that it works for any truss that the user
% wishes to analyze, whether 2-D or 3-D.
% Therefore, after your code is modified, all trusses should be assumed as
% 3-D Space Trusses.
% For 2-D planar trusses, the z-coordinate of each joint should be zero
% and the e3 magnitude of all external forces and reactions should be zero.
clear; clc;
% Print Banner to command window
fprintf('%s\n','*-----------------------------------------------*')
fprintf('%s\n','| CEE210 Statics, Computing Project 4 |')
fprintf('%s\n','| Original by Amie Baisley, 11.01.2013 |')
fprintf('%s\n','| Modified by Chris A. Lawrence, 04.02.2016 |')
fprintf('%s\n','*-----------------------------------------------*')
fprintf('\n\n\n')
%% ***********************************************************************
% Create a separate m file that contains several different truss input
% sections, any one of which can be copied and pasted into the truss
% analysis program, without having to modify the rest of the code.
% The file should be named CEE210_NNN_Truss_Inputs.m where NNN is your
% initials.
% The input file should contain every truss that was used to test your
% truss analysis code and must be submitted with your project.
% ************************************************************************
%% **********************************************************************
% 3D Space Trust from CP3
% Units used:
LUnit = 'ft'; % Length = ft or m
FUnit = 'lb'; % Force = lb or kip or N or kN
%.. Input problem data
nNodes = 7; % Number of nodes (pin joints) in the truss
nMembers = 15; % Number of members
nReactions = 3; % Number of force vector reactions
nLoads = 1; % Number of externally applied loads
nDim = 3; % Dimensions 2=2D, 3=3D
% *** Once your code is modified and tested, nDim must always equal 3 and
% the variable nDim cannot be used in your code.
nDOF = nDim * nNodes; % Number of degrees of freedom
tol = 1.e-8; % Remainder tolerance on norm of residual force
%.... Input node coordinates
Node(1,:) = [2,-3,0];
Node(2,:) = [2,3,0];
Node(3,:) = [-4,3,0];
Node(4,:) = [1,-1.5,6];
Node(5,:) = [1,1.5,6];
Node(6,:) = [-2,1.5,6];
Node(7,:) =[0,0,12];
%.... Finish inputting nodes
%.... Input member connections
Member(1,:) = [1,2];
Member(2,:) = [2,3];
Member(3,:) = [3,4];
Member(4,:) = [3,5];
Member(5,:) = [3,6];
Member(6,:) = [1,3];
Member(7,:) = [2,5];
Member(8,:) = [2,4];
Member(9,:) = [1,4];
Member(10,:) = [4,7];
Member(11,:) = [5,7];
Member(12,:) = [6,7];
Member(13,:) = [5,6];
Member(14,:) = [4,5];
Member(15,:) = [5,7];
%.... Finish inputting member connections
% Input support reactions
%.. First input is the node number
%.. Second input is resistance in the e1 direction
%.. Third input is resistance in the e2 direction
%.. Fourth input is resistance in the e3 direction (zero for 2-D trusses)
%*** 1 for resistance in that direction, 0 for no resistance ***
Reaction(1,:) = [1, 1,1,0]; % Pin at Node 1
Reaction(2,:) = [2, 0,1,0]; % Roller at Node 5
Reaction(3,:) = [3, 1,1,1];
% Input externallly applied loads
%.. First input is the node number, remaining inputs are the magnitude of
%.. the force in the e1, e2 and e3 directions, respectively.
Load(1,:) = [5, 0, 200, -500]; % 1000 lb load at Node 2
% End of Input Section for CP3 Space Trust.......
%*****************************************************************************************
%% Compute the unit vector (direction) for every member
PosVec = zeros(nMembers, 3); %Initialize Position Vector matrix
UnVec = zeros(nMembers, 3); %Initialize Unit Vector matrix
OppUnVec = zeros(nMembers, 3); %Initialize opposite direction matrix
for i = 1 : nMembers
SN = Member(i,1);
EN = Member(i,2);
% ***** This section is where your CP3 code should go. *****
PosVec(i,:) = Node(EN,:)- Node(SN,:); % postion vector
length=norm(PosVec(i,:));
UnVec(i,:)=PosVec(i,:)./norm(PosVec(i,:));
OppUnVec(i,:) = -PosVec(i,:)./norm(PosVec(i,:));
end
%% The coefficient matrix, C, contains the unit vectors (direction vectors)
% for each member force associated with each node. The unit vectors are
% then separated into e1, e2, e3 components and placed in separate rows.
% Therefore, each node has 2 rows (for 2-D) or 3 rows (for 3-D) associated
% with it; one for each of the e1, e2, e3 components.
% This corresponds with the Degrees of Freedom, nDOF, which is 2*nNodes
% for 2-D or 3*nNodes for 3-D.
% So the coefficient matrix has 2 or 3 rows for each node and one column
% for each member force.
C = zeros(3*nNodes, nMembers); %Initialize coefficient matrix
% Loop through all nodes, create the vector force equation for that node
% and store it in the proper row of the coefficient matrix, C.
for i = 1 : nNodes
for j = 1 : nMembers
SN = Member(j,1);
EN = Member(j,2);
if (SN == i) % If member j starts at node i
C(3*i-1, j) = UnVec(j,1);
C(3*i, j) = UnVec(j,2);
C(3*i, j) = UnVec(j,3);
elseif (EN == i) % If member j ends at node i
C(3*i-1, j) = OppUnVec(j,1);
C(3*i, j) = OppUnVec(j,2);
C(3*i, j) = OppUnVec(j,3);
end % if SN
end % for nMembers
end % for nNodes
%% The External Force matrix, F, contains the magnitude of all externally
% applied loads, (input as e1, e2, e3 components), stored in the
% proper rows to corespond with the node it is applied at.
% Therefore, the F matrix has 2 or 3 rows for each node and one column.
F = zeros(3*nNodes, 1); %Initialize External Force matrix
% Loop through all externally applied loads and place each component of the
% load (e1, e2, e3) in the proper rows in the external load matrix, F.
for i = 1 : nLoads
j = Load(i,1); % Which node, j is the load i on
F(3*j-1) = Load(i,2);
F(3*j) = Load(i,3);
F(3*j) = Load(i,4);
end % for i,nLoads
%% The Restraint matrix, Crest, contains the unit vectors (directions)
% for each member force associated with those nodes that are restrained by
% external supports.
% The Crest matrix has one row for each reaction component and one column
% for each member.
%.... Loop through all nodes and determine if there is a reaction at that
%.... node and seperate the reaction node equations from the force load
%.... equations.
nReaction = 1; %Used to count the number of reaction equations
%.... The nReactionEquation vector determines if a row should be put in the
%.... Crest matrix or the Cfree matrix
nReactionEquation = zeros(1, 3*nNodes);
for (j = 1 : nReactions)
for (i = 1 : nNodes)
if (Reaction(j,1) == i)
if (Reaction(j,2) == 1)
Crest(nReaction,:) = C(3*i-1,:);
nReactionEquation(3*i-1) = 1;
% If nReactionEquation is 1 it should be in the Crest
% matrix and not the Cfree matrix.
nReaction = nReaction+1;
end
if (Reaction(j,3) == 1)
Crest(nReaction,:) = C(3*i,:);
nReactionEquation(3*i) = 1;
% If nReactionEquation is 1 it should be in the Crest
% matrix and not the Cfree matrix.
nReaction = nReaction+1;
end
end
end
end
nForce = 1; %Used to count the number of Cfree equations
for (i = 1 : 3*nNodes)
if (nReactionEquation(i) == 1)
else
Cfree(nForce,:) = C(i,:);
Ffree(nForce) = F(i);
nForce = nForce + 1;
end
end
%% Solve first for the member forces and then solve for the support
% reactions.
% All of the values in the Cfree and Ffree matrices are known so you can
% now solve for the T matrix, which is the tension force in each member.
T = -(Cfree)\(Ffree)' ; % finish this equation
% Since all values in the Crest and T matrices are now known, you can solve
% for the support reactions.
Reactions = -Crest*T ; % finish this equation
% Calculate the residual to find the amount of error and ensure that
% equilibrium was satisfied.
Residual1 = (Cfree * T + Ffree');
Residual2 = (Crest * T + Reactions);
Res = norm(Residual1) + norm(Residual2);
% Create the support reaction matrix.
nReaction = 1;
for (i = 1 : nNodes)
if (nReactionEquation(3*i-1) == 1)
SupportReaction(i,1) = i;
SupportReaction(i,3) = Reactions(nReaction);
nReaction = nReaction+1;
end
if (nReactionEquation(3*i-2) == 1)
SupportReaction(i,1) = i;
SupportReaction(i,2) = Reactions(nReaction);
nReaction = nReaction+1;
end
if (nReactionEquation(3*i) == 1)
SupportReaction(i,1) = i;
SupportReaction(i,4) = Reactions(nReaction);
nReaction = nReaction+1;
end
end
%% Create output for command window
fprintf('%s\n' , '----------------------------------------')
fprintf('%s\n' , '------------- Truss --------------')
fprintf('%s\n' , '----------------------------------------')
fprintf('%s',' Node Coordinates (', LUnit, ')')
fprintf ('\n')
for i = 1 : nNodes
fprintf('%s%4i%8.3f%8.3f%8.3f\n',' Node: ', i, Node(i,:)')
end % for i, nNodes
fprintf ('\n')
fprintf('%s',' Member Forces (', FUnit, ')')
fprintf ('\n')
for i = 1 : nMembers
fprintf('%s%4i%12.3f\n',' Member Force: ',i, T(i))
end % for i, nMembers
fprintf ('\n')
for i = 1 : nReactions
for j = 1 : nNodes
if (Reaction(i,1) == j)
fprintf('%s%s%s%4i%12.3f%12.3f%12.3f\n',...
' Support Reaction (',FUnit,') at Node ',...
SupportReaction(j,:))
fprintf ('\n')
end % if Reaction
end % for j, nNodes
end % for i, nReactions
fprintf('\n%s%8.3f\n',' Residual Error: ', Res)
fprintf('\n\n\n')
%% Create the plot............................................
% Once your code is modified the plot will be 3-D and so you may need the
% "Rotate 3D" command to view the truss figure properly.
%.. Plot members with color indicating tension or compression
Marker = ceil(25 / sqrt(nNodes));
fig1 = figure(1); clf; grid on; axis equal;
hold on;
xlabel(cat(2, 'X (',LUnit,')' ));
ylabel(cat(2, 'Y (',LUnit,')' ));
zlabel(cat(2, 'Y (',LUnit,')' ));
title('Truss Analysis');
small = max(T)*tol;
for m = 1 : nMembers
if (T(m) < -small)
MColor = 'b'; % Color compression members blue
elseif (T(m) > small)
MColor = 'r'; % Color tension members red
else
MColor = 'k'; % Color "zero force members" black
end % if T
SN = Member(m,1);
EN = Member(m,2);
X = [Node(SN,1); Node(EN,1)];
Y = [Node(SN,2); Node(EN,2)];
Z = [Node(SN,3); Node(EN,3)];
if nDim== 3
p = plot3(X,Y,Z);
end
if nDim== 2
p = plot(X,Y);
end
set(p, 'Color', MColor, 'LineWidth', 6/nDim);
end % for m, nMembers
%.. Plot external reaction forces
Rlength = 0.1 * max(max(Node)); % establish size of line
e = [ 1, 0, 0 ; 0, 1, 0 ; 0, 0, 1];
for i = 1 : nReactions
for j = 1 : nNodes
if (Reaction(i,1) == j)
for k = 1 : 2
if(Reaction(i, k+1) == 1)
xR(1,:) = Node(j,:);
xR(2,:) = Node(j,:) - Rlength * e(k, 1:nDim);
xR(3,:) = Node(j,:) - Rlength * e(k, 1:nDim);
if nDim== 2
p = plot(xR(:,1),xR(:,2));
end
if nDim== 3
p = plot3(xR(:,1),xR(:,2),xR(3,:));
end
set(p,'Color','g','LineWidth',8/nDim);
end % if Reaction == 1
end % for k
end % if Reaction == j
end % for j, nNodes
end % for i, nReactions
%.. Plot loads
Llength = 0.1 * max(max(Node)); % establish size of line
Fmax = max(max(abs(Load))); % establish maximum force level
e = [ 1, 0, 0 ; 0, 1, 0 ; 0, 0, 1];
for i = 1 : nLoads
for j = 1 : nNodes
if (Load(i,1) == j)
for k = 1 : 2
F = Load(i, k+1) / Fmax;
xL(1,:) = Node(j,:);
xL(2,:) = Node(j,:) + Llength * F * e(k, 1:nDim);
xL(3,:) = Node(j,:) + Llength * F * e(k, 1:nDim);
if nDim== 2
p = plot(xL(:,1), xL(:,2));
end
if nDim== 3
p = plot3(xL(:,1), xL(:,2),xL(3,:));
end
set(p,'Color','c','LineWidth',8/nDim);
end % for k
end % if Load == j
end % for j, nNodes
end % for i, nLoads
%.. Plot nodes
if nDim==2
plot(Node(:,1), Node(:,2), 'o', 'LineWidth', 2,...
'MarkerFaceColor','w',...
'MarkerEdgeColor','k',...
'MarkerSize',Marker);
view(2);
end
if nDim == 3
plot3(Node(:,1), Node(:,2),Node(:,3), 'o', 'LineWidth', 2,...
'MarkerFaceColor','w',...
'MarkerEdgeColor','k',...
'MarkerSize',Marker);
view(2);
end
% End of Program
I dont know what to do it wont plot in 3D pls help!
Ariana Garciahttps://se.mathworks.com/matlabcentral/profile/authors/10775461-ariana-garciatag:se.mathworks.com,2005:Question/4571872019-04-18T14:27:09Z2019-04-20T23:54:34ZHow to wirte algorithm for meshing line element?Hi,
As you see in the figure, there is a truss structure composed of 2 elements and 3 nodes. In my code, ın order to calculate the stifness and mass matrices, X,Y and Z coordinate table(Table1) and elements table(Table 2) which is made manually are needed. The code runs with these initial information. Now, i want to divide these two elements into more elements whose number depends on the user.
My question is about the algoritm that will create Table1 and Table 2 automatically. What do you think about it? Is ıt possbible? If yes, would you write the steps for algorithm. I just need ideas.
hamit Kenanhttps://se.mathworks.com/matlabcentral/profile/authors/6463402-hamit-kenantag:se.mathworks.com,2005:Question/4568912019-04-17T09:48:15Z2019-04-20T23:32:53Zreference to non-existent field solidityhi I have error message in matlab 2017
reference to non-existent field 'solidity'
Error in Tumor(line denisty={stats.solidity};
how can I add reference
what did i miss ?Mohamed Nasrhttps://se.mathworks.com/matlabcentral/profile/authors/15316660-mohamed-nasrtag:se.mathworks.com,2005:Question/4575732019-04-20T20:05:51Z2019-04-20T23:24:35ZHow can i shift plot?I have a code i need to shift to right my plot by 1,2,3 and 5, respectively on x axis
p=[1/6 1/6 1/6 1/6 1/6 1/6];
q= conv(p,p)
r=conv(q,p)
rr=conv(r,p)
rrr=conv(rr,p)
rrrr=conv(rrr,p)
hold on
subplot(2,2,1),plot(p*100),xlabel('1 dice vs P(x)'),xlim([1,6]),legend('1 dice','P(x)')
hold on
subplot(2,2,2),plot(q*100),xlabel('2 dices vs Q(x)'),xlim([1,13]),legend('2 dices','Q(x)')
hold on
subplot(2,2,3),plot(r*100),xlabel('3 dices vs R(x)'),xlim([1,19]),legend('3 dices','R(x)')
hold on
subplot(2,2,4),plot(rrrr*100),xlabel('6 dices vs S(x)'),xlim([1,37]),legend('6 dices','S(x)')Ege Tunçhttps://se.mathworks.com/matlabcentral/profile/authors/6193601-ege-tunctag:se.mathworks.com,2005:Question/4569652019-04-17T15:37:15Z2019-04-20T23:08:24ZSimple moving average code for forecasting stock pricesI need code for predicting stock prices in future using simple moving average calculationMegawaty Lestarihttps://se.mathworks.com/matlabcentral/profile/authors/14895494-megawaty-lestaritag:se.mathworks.com,2005:Question/4563022019-04-14T17:57:22Z2019-04-20T22:15:36ZSystem of 2 differential equationsI'm trying to express the following two differential equations in matlab in a form that will allow me to input them into a solver such as ode45. How would I input the following equations into matlab:
dC/dt = (-exp((-10/(T+273)))*C
dT/dt = 1000*(exp((-10)/(T+273))*C-10*(T-20)
where C and T are concentration and temperature (dependent variables) and t is time (independent variable).
Filip Jackowskihttps://se.mathworks.com/matlabcentral/profile/authors/9548942-filip-jackowskitag:se.mathworks.com,2005:Question/4575902019-04-20T21:57:59Z2019-04-20T21:57:59ZDifferences in Performance Between Simulink and Matlab FIRsI am building a BPSK recovery system in Simulink, with the end goal of using the HDL coder to implement it on an FPGA.
I designed the algorithm in MATLAB first, and it works fine. However, translating it to Simulink is giving me trouble.
One of my first steps is to filter my data, which I implemented in MATLAB as
filfir2=fir1(100,[0.000001 8e6/Fs*2]); % Fs=30e6
data = filter(filfir2,1,data); %where data is the raw signal
Implementing the same thing in Simulink however, using the Digital Filter Designer (a 100 tap Hamming window direct form FIR with the same cutoff parameters, resulting in the same Bode plot), gives very different results with the same data:
The orange trace is the data filtered through the Simulink block, and the blue trace is the data filtered through Matlab and brought into Simulink with a From Workspace block.
I also tried
1) Importing my Simulink filter into Matlab and using it in Matlab before sending the filtered data to Simulink
2) Importing my Matlab filter (as a dffir block) into Simulink
Both performed identically to the original Matlab filter (i.e the blue trace).
I am wondering if there is a sample time issue or something where the actual simulation is what's causing the issue?
Thanks!
Ethan M.
Ethan Mokhttps://se.mathworks.com/matlabcentral/profile/authors/6899028-ethan-moktag:se.mathworks.com,2005:Question/4575722019-04-20T19:58:05Z2019-04-20T21:56:19ZHow to remove weekend from a TimeTable PlotHi!
I want to plot CandleStick pattern based on a TimeTable I have. In this case, I want to remove the gap on my chart caused by weekends. The following code simply remove the weekends from the timetable
T = T(~isweekend(T.DateTime),:);
However, I still have the gap when I plot the Candls since the xaxis shows the weekends gap! How can I remove this gap?
Siahttps://se.mathworks.com/matlabcentral/profile/authors/3787650-siatag:se.mathworks.com,2005:Question/4574722019-04-20T01:37:14Z2019-04-20T21:44:37ZHelp me understand the Classifier AppI am looking to create a classifier in Matlab, but I'm having some issues in understanding how exactly it works. I have several data sets of n x 9 arrays with readings from 3 separate 3-axis analog sensors (outputting values in m/s^2), and I want to create a classifier to distinguish between a state described by each of these arrays (walking, standing, running, etc.). I am having significant issue understanding how the classifier app in Matlab can train a model to do such a thing, however, and each time I attempt to "train" it, I get exceptionally poor model performance. I am obviously missing something key here, and I'm not sure where to go. I do have a fairly elementary understanding of classifiers, but I'm finding the documentation available to be confusing. Riley Stromhttps://se.mathworks.com/matlabcentral/profile/authors/6832935-riley-stromtag:se.mathworks.com,2005:Question/4575802019-04-20T21:01:51Z2019-04-20T21:43:57Zlimits are too large i have parametrized surface equation T(u,v)=e^(u^2+v^2) i + ln(2*v) j + tan(5*u) k . I used this code to plot it in 3D but it gives error 'limits are too large '. can yu help me pls.
clc; clear all ;
M = 100 ; N = 100 ;
uinf = 100 ;
u = linspace(0,uinf,M) ;
v = linspace(0,2*pi,N) ;
[U V] = meshgrid(u,v) ;
X = exp(U.^2+V.^2) ;
Y = log(2.*V) ;
Z = tan(5*U) ;
surf(X,Y,Z) ;Kuatra Patilhttps://se.mathworks.com/matlabcentral/profile/authors/15291254-kuatra-patiltag:se.mathworks.com,2005:Question/4575842019-04-20T21:19:53Z2019-04-20T21:42:57ZHow can I sort an array of structures based upon a particular field in MATLAB?
I've got a eeg_data_all(cell,size = 1*35), which contains 35*3 cells maybe. I want to sort these data by the 'subid'. How can I do this?Wenyi Xiaohttps://se.mathworks.com/matlabcentral/profile/authors/13762167-wenyi-xiaotag:se.mathworks.com,2005:Question/4574452019-04-19T21:15:37Z2019-04-20T21:42:54ZWriting equations in a matrix formHi MATLAB experts,
Could any one please help me to write-down the following equations into a matrix form? the initial value of c = zeros(I, L, K, M)
0<= c(i, j, k, m) <= 1 for all k= {1, 2, ...., K} and m = {1, 2, ..., M} and i = {1,...., I} and j = {1,..., L}
0<=sum_{j} sum_{i} c(i,j,k,m) <= 1 for all k= {1, 2, ...., K} and m = {1, 2, ..., M}Su sanhttps://se.mathworks.com/matlabcentral/profile/authors/14788079-su-santag:se.mathworks.com,2005:Question/4575872019-04-20T21:34:21Z2019-04-20T21:34:21Zplotting 3D curve and tangent at specified pointi have position vector r(t)=<t , t^2 , 2>, i have to plot it using plot3 function and also plot tangent at the point P(-1 , 1, 2) but i cant figure it out. can you help me please.Kuatra Patilhttps://se.mathworks.com/matlabcentral/profile/authors/15291254-kuatra-patiltag:se.mathworks.com,2005:Question/4575852019-04-20T21:25:47Z2019-04-20T21:29:38ZMATLAB system of ODEsdC/dt = (-exp((-10/(T+273)))*C
dT/dt = 1000*(exp((-10)/(T+273))*C-10*(T-20)
% Describe how C and T change for initial conditions of T=15 when C=1.
% Find C and T as a function of time.
% Plot the results on a single figure (would use two separate y-axes)
% Apologize for the formatting errors, but could someone help me write a script to perform these actions?Filip Jackowskihttps://se.mathworks.com/matlabcentral/profile/authors/9548942-filip-jackowskitag:se.mathworks.com,2005:Question/4575862019-04-20T21:27:41Z2019-04-20T21:27:41Zconvert from Longitude latitude to UPS( universal polar stereographic)Hey I am looking any simple way to convert from wgs 84 to UPS and vice versa .I've looked on site here in the tab file Exchange but I could not find any file with convert ups to wgs 84adam jakishttps://se.mathworks.com/matlabcentral/profile/authors/15337896-adam-jakistag:se.mathworks.com,2005:Question/4575832019-04-20T21:11:11Z2019-04-20T21:16:14ZSolving integrals with Matlab % Numerical Integration
f(x)=int(sym('7+1/sqrt(1-x^2)',1/2,0))
I am stuck on this calculus problem. It is numerical integration, how do i write a code for this problem?It gives me error and i don't know what i am doing incorrectly.
The problem is f(x)= integral sign(7+1/sqrt(1-x^2)). Upper bound of integral sign is 1/2 and lower bound of integral sign is 0.
Jerald Johnsonhttps://se.mathworks.com/matlabcentral/profile/authors/15337747-jerald-johnsontag:se.mathworks.com,2005:Question/4567942019-04-16T21:36:07Z2019-04-20T21:09:43ZRTL generation error: Signal rate of value inf foundHi,
How do I resolve this RTL generation error: "Failed Native floating-point code generation cannot complete for the following reason(s): 'PID_Z_Drvr_Plus_Coil_And_Snubber1 Signal rate of value inf found"? I do not understand what "rate of value inf found" means, or where in the model to find it.
Thank you,
ShawnShawn Whitmanhttps://se.mathworks.com/matlabcentral/profile/authors/2927860-shawn-whitmantag:se.mathworks.com,2005:Question/579612013-01-04T13:04:14Z2019-04-20T21:02:24ZSimulating a Markov chainHello,
Would anybody be able to help me simulate a discrete time markov chain in Matlab?
I have a transition probability matrix with 100 states (100x100) and I'd like to simulate 1000 steps with the initial state as 1.
I'd appreciate any help as I've been trying to do this myself all week with no success and have not been able to source suitable code online.
Kind Regards
JohnJohnhttps://se.mathworks.com/matlabcentral/profile/authors/2960907-johntag:se.mathworks.com,2005:Question/4496942019-03-12T19:12:51Z2019-04-20T21:00:01ZTextanalytics Toolbox install fails with examples/textanalytics_glnxa64Hi,
i just want to install the toolbox via Apps-> get more apps -- and after start of installation (30 %) I get:
The following error was detected while installing examples/textanalytics_glnxa64: /home/xxxxxxxx/help/examples/textanalytics/glnxa64/ClassifyTextDataUsingDeepLearningExample_01.png (Datei oder Verzeichnis nicht gefunden) Would you like to retry installing examples/textanalytics_glnxa64? If you press No, the installer will exit without completing the installation. More information can be found at /tmp/mathworks_fa.log
The log isn helpfull:
(Mär 12, 2019 19:54:40) java.io.FileNotFoundException: /home/xxxxxxx/examples/textanalytics/glnxa64/ClassifyTextDataUsingDeepLearningExample_01.png (Datei oder Verzeichnis nicht gefunden)
at java.io.FileOutputStream.open0(Native Method)....
System: R2018b Student Licence @ Linux Mint 18.x; 4.15.0-46-generic
Any hint? Thanksfalkhttps://se.mathworks.com/matlabcentral/profile/authors/13726414-falktag:se.mathworks.com,2005:Question/4575782019-04-20T20:49:38Z2019-04-20T20:49:38Zgenerate key using primitive polynomial Hello
I want to create a key using primitive polynomial function of degree n over GF(2)
How can I get it?
i anyone know pls help me.
Ali
ammar mohammedhttps://se.mathworks.com/matlabcentral/profile/authors/14858931-ammar-mohammedtag:se.mathworks.com,2005:Question/4575772019-04-20T20:40:55Z2019-04-20T20:44:48ZHow to change negative values of matrix with for loops
Here is the program I am trying to write. So far, I have the user input code yet I do not know how to use the for loops.
Nicole Jeselsonhttps://se.mathworks.com/matlabcentral/profile/authors/15337828-nicole-jeselsontag:se.mathworks.com,2005:Question/4575762019-04-20T20:34:23Z2019-04-20T20:43:15ZCalibration of Spirometer Data Rafael Peraltahttps://se.mathworks.com/matlabcentral/profile/authors/10822895-rafael-peralta