19252

Dimensions of matrices being concatenated are not consistent in 1x6802 double and 6802x1 double data

Question:

I want to export m file signal to matfile in simulink. Here I am having a problem. My code is

Y; X; T; K=zeros(1,6802); for n=1:10:6800; angle=atan((Y(n+10)-Y(n))/(X(n+10)-X(n))); K(n)=angle; end yt=[T;K], plot(T,K)

The error message is <strong>Error using vertcat Dimensions of matrices being concatenated are not consistent. Error in work1 (line 20415) yt=[T;K],</strong>

Here K=1x6802 double and T=6802x1 double. I have gone through similar problems and solution but exactly not found my answer. It would be very helpful if someone helps me in solving the issue. Thanks in advance.

Answer1:

Given the dimensions of K and T, you will have to transpose (the ' operator) one in order to combine into a new matrix:

yt=[T';K]; % dimensions will be 2x6802

Recommend

  • how to escape quotes in command argument to sh -c? [duplicate]
  • concatenate certain columns across multiple rows
  • Python concatenation vs append speed on lists
  • PHP - Matching city/street names in PHP using unicode regex
  • Allocating memory for two concatenated strings
  • Laravel Elixir - Compile/concat all less files into one css file?
  • Flattening JSONB array in postgres
  • Why is this scala concatenation function not tail recursive?
  • loading csv column into numpy memmap (fast)
  • How to add XML declaration to xml with XMLBeans
  • How to map strings to URIs?
  • Dynamically access column value in record
  • Enabling strict mode for multiple JavaScript files
  • How can I iteratively create buses of parameterized size to connect modules also iteratively created
  • Have Grunt include different Javascript files in development and production
  • Safe way to implement matrix class with bracket operators
  • Sql Server 2008 - FullText rounding money values?
  • Shift operation implementation in java
  • Benefits of using a CSS framework [duplicate]
  • Paste values together based on a grouping variable
  • How to have NHibernate persist a String.Empty property value as NULL
  • Showing a concatenated string from multiple values of observable array
  • Extracting infromation from multiple JSON files to single CSV file in python
  • How to deal with SpiderWebPlot in JFreeChart?
  • concatenating select menus into a single form input
  • Geom_jitter colour based on values
  • How to concat Pandas dataframe columns
  • How to create a 2D image by rotating 1D vector of numbers around its center element?
  • NHibernate Validation Localization with S#arp Architecture
  • How can I send an e-mail from a vbs script
  • Accessing IRQ description array within a module and displaying action names
  • Build own AppleScript numerical error handling
  • Websockets service method fails during R startup
  • Google cloud sdk not working when python points python3
  • Is there a mandatory requirement to switch app.yaml?
  • Hits per day in Google Big Query
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • Getting Messege Twice Using IMvxMessenger
  • Linking SubReports Without LinkChild/LinkMaster
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass